diff options
| author | joonhoekim <26rote@gmail.com> | 2025-12-08 19:48:13 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-12-08 19:48:13 +0900 |
| commit | aa89ba2ab47e3ad1ce3277fd11bc61546d20bbac (patch) | |
| tree | 2f72e6e8efcdc8b79aa730c64a41d0c40fa3700a /db/schema/pq.ts | |
| parent | 3ef36fc20e10391619be0a57de1b2184dece606a (diff) | |
| parent | b5ef49dce92c8994530f6ff670c81693c8716daf (diff) | |
Diffstat (limited to 'db/schema/pq.ts')
| -rw-r--r-- | db/schema/pq.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/schema/pq.ts b/db/schema/pq.ts index a9d92953..68c58613 100644 --- a/db/schema/pq.ts +++ b/db/schema/pq.ts @@ -63,6 +63,23 @@ export const pqCriterias = pgTable("pq_criterias", { .notNull() .default("TEXT"), + // 내자/외자/내외자 구분 (nullable, 기본값: 내외자) + type: varchar("type", { length: 20 }).default("내외자"), + + createdAt: timestamp("created_at").defaultNow().notNull(), + updatedAt: timestamp("updated_at").defaultNow().notNull(), +}); + +// PQ 기준 첨부파일 +export const pqCriteriasAttachments = pgTable("pq_criterias_attachments", { + id: serial("id").primaryKey(), + pqCriteriaId: integer("pq_criteria_id") + .notNull() + .references(() => pqCriterias.id, { onDelete: "cascade", onUpdate: "cascade" }), + fileName: varchar("file_name", { length: 255 }).notNull(), + originalFileName: varchar("original_file_name", { length: 255 }), + filePath: varchar("file_path", { length: 1024 }).notNull(), + fileSize: integer("file_size"), createdAt: timestamp("created_at").defaultNow().notNull(), updatedAt: timestamp("updated_at").defaultNow().notNull(), }); @@ -419,6 +436,7 @@ export const vendorInvestigationsView = pgView( // PQ 정보 pqItems: vendorPQSubmissions.pqItems, + pqType: vendorPQSubmissions.type, pqNumber: vendorPQSubmissions.pqNumber, // User names and emails instead of just IDs |
