Schema Changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user