12 lines
402 B
TypeScript
12 lines
402 B
TypeScript
import { text, sqliteTable } from "drizzle-orm/sqlite-core";
|
|
import { orders } from "./orders";
|
|
|
|
export const auditEvents = sqliteTable("audit_events", {
|
|
id: text("id").primaryKey(),
|
|
orderId: text("order_id").notNull().references(() => orders.id),
|
|
actor: text("actor").notNull(),
|
|
type: text("type").notNull(),
|
|
message: text("message").notNull(),
|
|
createdAt: text("created_at").notNull()
|
|
});
|