refactor: remove category rules and related logic from defaults, types, and services for cleaner codebase

This commit is contained in:
Julien Froidefond
2025-11-27 10:41:10 +01:00
parent 2aafce4df0
commit cf109984e5
6 changed files with 5 additions and 135 deletions

View File

@@ -79,23 +79,9 @@ model Category {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
parent Category? @relation("CategoryHierarchy", fields: [parentId], references: [id], onDelete: Cascade)
children Category[] @relation("CategoryHierarchy")
parent Category? @relation("CategoryHierarchy", fields: [parentId], references: [id], onDelete: Cascade)
children Category[] @relation("CategoryHierarchy")
transactions Transaction[]
rules CategoryRule[]
@@index([parentId])
}
model CategoryRule {
id String @id @default(cuid())
categoryId String
pattern String
isRegex Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
category Category @relation(fields: [categoryId], references: [id], onDelete: Cascade)
@@index([categoryId])
}