refactor: remove category rules and related logic from defaults, types, and services for cleaner codebase
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user