Mehrere Stichtage pro Zeitraum verwalten
All checks were successful
CI / Build and Deploy (push) Successful in 2m43s
All checks were successful
CI / Build and Deploy (push) Successful in 2m43s
This commit is contained in:
@@ -86,6 +86,7 @@ model AccountingPeriod {
|
||||
isCurrent Boolean @default(false) @map("is_current")
|
||||
cutoffName String @default("Open Air") @map("cutoff_name")
|
||||
cutoffDate DateTime? @map("cutoff_date")
|
||||
cutoffs PeriodCutoff[]
|
||||
budgets Budget[]
|
||||
expenses Expense[]
|
||||
donations Donation[]
|
||||
@@ -95,6 +96,20 @@ model AccountingPeriod {
|
||||
@@map("accounting_periods")
|
||||
}
|
||||
|
||||
model PeriodCutoff {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
date DateTime? @map("date")
|
||||
periodId String @map("period_id")
|
||||
period AccountingPeriod @relation(fields: [periodId], references: [id], onDelete: Cascade)
|
||||
expenses Expense[]
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@index([periodId])
|
||||
@@map("period_cutoffs")
|
||||
}
|
||||
|
||||
model AppSettings {
|
||||
id String @id @default("global")
|
||||
approvalThreshold Decimal @default(50) @db.Decimal(10, 2) @map("approval_threshold")
|
||||
@@ -148,6 +163,7 @@ model Expense {
|
||||
approvalStatus ApprovalStatus @default(PENDING) @map("approval_status")
|
||||
recurrence ExpenseRecurrence @default(NONE)
|
||||
recurrenceStartAt DateTime? @map("recurrence_start_at")
|
||||
cutoffId String? @map("cutoff_id")
|
||||
cutoffPhase CutoffPhase @default(PRE) @map("cutoff_phase")
|
||||
paidAt DateTime? @map("paid_at")
|
||||
documentedAt DateTime? @map("documented_at")
|
||||
@@ -157,6 +173,7 @@ model Expense {
|
||||
workingGroup WorkingGroup @relation(fields: [agId], references: [id], onDelete: Cascade)
|
||||
budget Budget @relation(fields: [budgetId], references: [id], onDelete: Restrict)
|
||||
period AccountingPeriod @relation(fields: [periodId], references: [id], onDelete: Restrict)
|
||||
cutoff PeriodCutoff? @relation(fields: [cutoffId], references: [id], onDelete: SetNull)
|
||||
approvals Approval[]
|
||||
documents ExpenseDocument[]
|
||||
donations Donation[]
|
||||
|
||||
Reference in New Issue
Block a user