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({ withTimezone: true }).notNull(), endedAt: timestamp({ withTimezone: true }), 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;