feat: implement lottery win feature and update related components
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m18s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m18s
This commit is contained in:
@@ -105,13 +105,13 @@ model Trade {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
hashtagId String
|
||||
hashtag Hashtag @relation(fields: [hashtagId], references: [id])
|
||||
hashtagId String?
|
||||
hashtag Hashtag? @relation(fields: [hashtagId], references: [id])
|
||||
type TradeType
|
||||
shares Float
|
||||
price Float // price per share at time of trade
|
||||
price Float // price per share at time of trade (or win amount for LOTTERY_WIN)
|
||||
total Float // cost/proceeds of the trade
|
||||
profit Float @default(0) // realized P&L (for SELL trades)
|
||||
profit Float @default(0) // realized P&L (for SELL trades and LOTTERY_WIN)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([userId])
|
||||
@@ -129,4 +129,5 @@ enum TradeType {
|
||||
SELL_LONG
|
||||
BUY_SHORT
|
||||
SELL_SHORT
|
||||
LOTTERY_WIN
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user