Added Backend
This commit is contained in:
21
backend/db/schema/serialexecutions.ts
Normal file
21
backend/db/schema/serialexecutions.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import {
|
||||
pgTable,
|
||||
bigint,
|
||||
timestamp,
|
||||
text,
|
||||
jsonb,
|
||||
boolean,
|
||||
uuid,
|
||||
} from "drizzle-orm/pg-core"
|
||||
import {tenants} from "./tenants";
|
||||
|
||||
export const serialExecutions = pgTable("serial_executions", {
|
||||
id: uuid("id").primaryKey().defaultRandom(),
|
||||
tenant: bigint("tenant", { mode: "number" })
|
||||
.notNull()
|
||||
.references(() => tenants.id), executionDate: timestamp("execution_date").notNull(),
|
||||
status: text("status").default("draft"), // 'draft', 'completed'
|
||||
createdBy: text("created_by"), // oder UUID, je nach Auth-System
|
||||
createdAt: timestamp("created_at").defaultNow(),
|
||||
summary: text("summary"), // z.B. "25 Rechnungen erstellt"
|
||||
});
|
||||
Reference in New Issue
Block a user