Schema Changes

This commit is contained in:
2025-12-06 19:29:28 +01:00
parent 63af22b671
commit 7450f90a0f
7 changed files with 55 additions and 55 deletions

View File

@@ -19,19 +19,19 @@ import { createddocuments } from "./createddocuments"
import { bankstatements } from "./bankstatements"
import { accounts } from "./accounts" // Falls noch nicht erstellt → bitte melden!
export const statementAllocations = pgTable("statementallocations", {
export const statementallocations = pgTable("statementallocations", {
id: uuid("id").primaryKey().defaultRandom(),
// foreign keys
bsId: integer("bs_id")
bs_id: integer("bs_id")
.notNull()
.references(() => bankstatements.id),
cdId: integer("cd_id").references(() => createddocuments.id),
cd_id: integer("cd_id").references(() => createddocuments.id),
amount: doublePrecision("amount").notNull().default(0),
iiId: bigint("ii_id", { mode: "number" }).references(
ii_id: bigint("ii_id", { mode: "number" }).references(
() => incominginvoices.id
),
@@ -64,6 +64,6 @@ export const statementAllocations = pgTable("statementallocations", {
archived: boolean("archived").notNull().default(false),
})
export type StatementAllocation = typeof statementAllocations.$inferSelect
export type StatementAllocation = typeof statementallocations.$inferSelect
export type NewStatementAllocation =
typeof statementAllocations.$inferInsert
typeof statementallocations.$inferInsert