diff options
Diffstat (limited to 'db/schema/procurementRFQ.ts')
| -rw-r--r-- | db/schema/procurementRFQ.ts | 18 |
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", { |
