diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-03 12:44:32 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-03 12:44:32 +0000 |
| commit | 688d9884ca98b50d04ac78fc1f6e28e034a519c0 (patch) | |
| tree | 95cf4572882a4d771db9443140d8cf2735d840d7 /db/schema | |
| parent | 522176a23ad9db47f85ceed13b2e54d369aa6e0a (diff) | |
(대표님) rfq-last 작업, vendorDocu 스키마 변경, 벤더 문서 관련 변경
Diffstat (limited to 'db/schema')
| -rw-r--r-- | db/schema/rfqLast.ts | 7 | ||||
| -rw-r--r-- | db/schema/vendorDocu.ts | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/db/schema/rfqLast.ts b/db/schema/rfqLast.ts index 34cb7bf3..34c61cd0 100644 --- a/db/schema/rfqLast.ts +++ b/db/schema/rfqLast.ts @@ -169,9 +169,12 @@ export const rfqPrItems = pgTable( // .references(() => items.id, { onDelete: "set null" }), materialCode: varchar("material_code", { length: 255 }), - materialCategory: varchar("material_category", { length: 255 }), + materialCategory: varchar("material_category", { length: 255 }),//자재그룹코드 + acc: varchar("acc", { length: 255 }), materialDescription: varchar("material_description", { length: 255 }), + + size: varchar("size", { length: 255 }), deliveryDate: date("delivery_date", { mode: "date" }) .$type<Date>(), @@ -696,6 +699,8 @@ export type RfqsLastView = typeof rfqsLastView.$inferSelect; export type PrItemsLastView = typeof prItemsLastView.$inferSelect; export type RfqLastDetailsView = typeof rfqLastDetailsView.$inferSelect; +export type RfqLastAttachments = typeof rfqLastAttachments.$inferSelect; + export const rfqLastRelations = relations( rfqsLast, diff --git a/db/schema/vendorDocu.ts b/db/schema/vendorDocu.ts index b7136a5c..927c566d 100644 --- a/db/schema/vendorDocu.ts +++ b/db/schema/vendorDocu.ts @@ -84,6 +84,7 @@ export const documents = pgTable( uniqueExternalDoc: uniqueIndex("unique_external_doc").on( table.contractId, table.externalDocumentId, + table.discipline, table.externalSystemType ).where(sql`${table.externalDocumentId} IS NOT NULL`), @@ -102,6 +103,7 @@ export const documents = pgTable( uniqueExternalDocProject: uniqueIndex("unique_external_doc_project").on( table.projectId, table.externalDocumentId, + table.discipline, table.externalSystemType ).where(sql`${table.externalDocumentId} IS NOT NULL`), |
