feat(trips): trip tracking with analytics, tag conversion, and transaction assignment
Adds trips table usage across API and UI: trip CRUD, per-trip analytics (category/daily/merchant/tag/participant breakdowns), tag-to-trip conversion, trip assignment via transaction overrides, and trip filter in the transactions view. Recovered from working tree after local git corruption; feature was already live via host-context Docker builds.
This commit is contained in:
@@ -7,6 +7,19 @@ datasource db {
|
||||
provider = "postgresql"
|
||||
}
|
||||
|
||||
model trips {
|
||||
id Int @id @default(autoincrement())
|
||||
owner_id Int
|
||||
name String
|
||||
description String?
|
||||
start_date DateTime? @db.Date
|
||||
end_date DateTime? @db.Date
|
||||
color String @default("#6366f1")
|
||||
archived Boolean @default(false)
|
||||
created_at DateTime @default(now())
|
||||
overrides transaction_overrides[]
|
||||
}
|
||||
|
||||
model transaction_overrides {
|
||||
id Int @id @default(autoincrement())
|
||||
transaction_id Int @unique
|
||||
@@ -15,6 +28,8 @@ model transaction_overrides {
|
||||
notes String?
|
||||
my_share_percent Decimal? @db.Decimal(5, 2)
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
trip_id Int?
|
||||
trip trips? @relation(fields: [trip_id], references: [id], onDelete: SetNull)
|
||||
}
|
||||
|
||||
model participants {
|
||||
|
||||
Reference in New Issue
Block a user