summaryrefslogtreecommitdiff
path: root/db/schema/procurementRFQ.ts
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-08-04 11:07:10 +0000
committerjoonhoekim <26rote@gmail.com>2025-08-04 11:07:10 +0000
commit305a29e0e245ed9de1a7f4d32e96634116dcda82 (patch)
treebba0f654d7072ab8b619ac08ccc4b988fef143f3 /db/schema/procurementRFQ.ts
parent4dc27e9495b005b29b4d7a2ad404c8c0644769eb (diff)
(김준회) SOAP ECC 개선, 린터 오류 해결, 구매 기준정보(인코텀즈, 지불조건, 장소(출발지, 도착지)) Non-SAP 동기화 처리
Diffstat (limited to 'db/schema/procurementRFQ.ts')
-rw-r--r--db/schema/procurementRFQ.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/db/schema/procurementRFQ.ts b/db/schema/procurementRFQ.ts
index 23521aaf..ef1198bc 100644
--- a/db/schema/procurementRFQ.ts
+++ b/db/schema/procurementRFQ.ts
@@ -61,6 +61,12 @@ export const procurementRfqs = pgTable(
);
+/**
+ * 지불조건, 인코텀즈, 선적/하역(출발지, 도착지) 테이블은 Non-SAP에서 동기화 (Oracle DB to PostgreSQL)
+ * 동기화 로직은 instrumentation.ts 에서 node-cron 을 통해 job으로 등록됨
+ */
+
+// 지불조건 테이블 (Non-SAP 에서 동기화)
export const paymentTerms = pgTable("payment_terms", {
code: varchar("code", { length: 50 }).primaryKey(),
description: varchar("description", { length: 255 }).notNull(),
@@ -71,7 +77,7 @@ export const paymentTerms = pgTable("payment_terms", {
createdAt: timestamp("created_at").defaultNow().notNull(),
});
-// 인코텀즈 테이블
+// 인코텀즈 테이블 (Non-SAP 에서 동기화)
export const incoterms = pgTable("incoterms", {
code: varchar("code", { length: 20 }).primaryKey(),
description: varchar("description", { length: 255 }).notNull(),
@@ -81,6 +87,16 @@ export const incoterms = pgTable("incoterms", {
createdAt: timestamp("created_at").defaultNow().notNull(),
});
+// 선적/하역 테이블 (Non-SAP 에서 동기화)
+export const placeOfShipping = pgTable("place_of_shipping", {
+ code: varchar("code", { length: 20 }).primaryKey(),
+ description: varchar("description", { length: 255 }).notNull(),
+ isActive: boolean("is_active").default(true).notNull(),
+ createdBy: integer("created_by")
+ .references(() => users.id, { onDelete: "set null" }),
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+});
+
export const procurementRfqDetails = pgTable(
"procurement_rfq_details",
{