From 15b2d4ff61d0339385edd8cc67bf7579fcc2af08 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Fri, 27 Jun 2025 01:25:48 +0000 Subject: (김준회) MDG SOAP 수신 유틸리티 및 API 엔드포인트, 스키마 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema/SOAP/soap.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 db/schema/SOAP/soap.ts (limited to 'db/schema/SOAP') diff --git a/db/schema/SOAP/soap.ts b/db/schema/SOAP/soap.ts new file mode 100644 index 00000000..7a16b50a --- /dev/null +++ b/db/schema/SOAP/soap.ts @@ -0,0 +1,22 @@ +import { serial, varchar, timestamp, text, boolean } from "drizzle-orm/pg-core"; +import { pgSchema } from "drizzle-orm/pg-core"; + +export const soapSchema = pgSchema("soap"); + +export const soapLogs = soapSchema.table("soap_logs", { + id: serial().primaryKey(), + direction: varchar({ length: 20 }).notNull(), + system: varchar({ length: 50 }).notNull(), + interface: varchar({ length: 100 }).notNull(), + startedAt: timestamp().notNull(), + endedAt: timestamp(), + isSuccess: boolean().default(false).notNull(), + requestData: text(), + responseData: text(), + errorMessage: text(), +}); + +export type LogDirection = 'INBOUND' | 'OUTBOUND'; + +export type SoapLogInsert = typeof soapLogs.$inferInsert; +export type SoapLogSelect = typeof soapLogs.$inferSelect; \ No newline at end of file -- cgit v1.2.3