feat: add hedge fund management features including creation, deletion, and manager assignments
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m23s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m23s
This commit is contained in:
@@ -19,9 +19,37 @@ model User {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
isFund Boolean @default(false)
|
||||
|
||||
positions Position[]
|
||||
trades Trade[]
|
||||
passwordResets PasswordReset[]
|
||||
managedFunds FundManager[]
|
||||
fund HedgeFund?
|
||||
}
|
||||
|
||||
model HedgeFund {
|
||||
id String @id @default(cuid())
|
||||
name String @unique
|
||||
slug String @unique // lowercase, URL-safe
|
||||
userId String @unique // shadow User account that holds positions/trades/balance
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
managers FundManager[]
|
||||
|
||||
@@index([slug])
|
||||
}
|
||||
|
||||
model FundManager {
|
||||
id String @id @default(cuid())
|
||||
fundId String
|
||||
fund HedgeFund @relation(fields: [fundId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
addedAt DateTime @default(now())
|
||||
|
||||
@@unique([fundId, userId])
|
||||
}
|
||||
|
||||
model PasswordReset {
|
||||
|
||||
Reference in New Issue
Block a user