history for users too
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m21s

This commit is contained in:
2026-03-19 16:07:47 -04:00
parent 9a87c0c7c5
commit aa7a80c3e7
5 changed files with 87 additions and 8 deletions
+12
View File
@@ -28,6 +28,7 @@ model User {
managedFunds FundManager[]
fund HedgeFund?
fundInvestments FundInvestment[]
portfolioHistory UserPortfolioHistory[]
}
model HedgeFund {
@@ -143,6 +144,17 @@ model FundNavHistory {
@@index([fundId, recordedAt])
}
model UserPortfolioHistory {
id String @id @default(cuid())
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
totalValue Float
portfolioValue Float
recordedAt DateTime @default(now())
@@index([userId, recordedAt])
}
model Position {
id String @id @default(cuid())
userId String