summaryrefslogtreecommitdiff
path: root/db/schema/SOAP
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/SOAP')
-rw-r--r--db/schema/SOAP/soap.ts22
1 files changed, 22 insertions, 0 deletions
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