const user = await prisma.user.create({
data:{
email: "[email protected]",
balance : 0.00,
username : "arshbakh",
}
})
model Bet {
id Int @id @default(autoincrement())
placedDate DateTime? @default(now())
updateDate DateTime? @updatedAt
team1 String?
team2 String?
amount Float?
winningAmount Float?
status String?
odds Float?
//many bets to one user
user User? @relation(fields: [userId], references: [id])
userId Int?
//many bets to one agent
agent Agent? @relation(fields: [agentId], references: [id])
agentId Int?
}
const user = await prisma.user.create({
data:{
email: "[email protected]",
balance : 0.00,
username : "arshbakh",
}
})
model Bet {
id Int @id @default(autoincrement())
placedDate DateTime? @default(now())
updateDate DateTime? @updatedAt
team1 String?
team2 String?
amount Float?
winningAmount Float?
status String?
odds Float?
//many bets to one user
user User? @relation(fields: [userId], references: [id])
userId Int?
//many bets to one agent
agent Agent? @relation(fields: [agentId], references: [id])
agentId Int?
}