This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user