Modification BDD stockage défi actif
This commit is contained in:
@ -8,15 +8,17 @@ datasource db {
|
||||
}
|
||||
|
||||
model Player {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
password String
|
||||
money Int @default(0)
|
||||
actions ChallengeAction[]
|
||||
geolocations Geolocation[]
|
||||
moneyUpdates MoneyUpdate[]
|
||||
trips TrainTrip[]
|
||||
runs PlayerRun[]
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
password String
|
||||
money Int @default(0)
|
||||
activeChallenge ChallengeAction? @relation("ActiveChallenge", fields: [activeChallengeId], references: [id])
|
||||
activeChallengeId Int? @unique
|
||||
actions ChallengeAction[]
|
||||
geolocations Geolocation[]
|
||||
moneyUpdates MoneyUpdate[]
|
||||
trips TrainTrip[]
|
||||
runs PlayerRun[]
|
||||
}
|
||||
|
||||
model Game {
|
||||
@ -68,7 +70,6 @@ model ChallengeAction {
|
||||
playerId Int
|
||||
challenge Challenge @relation(fields: [challengeId], references: [id])
|
||||
challengeId Int @unique
|
||||
active Boolean @default(false)
|
||||
success Boolean @default(false)
|
||||
start DateTime @default(now()) @db.Timestamptz(3)
|
||||
end DateTime? @db.Timestamptz(3)
|
||||
@ -76,6 +77,7 @@ model ChallengeAction {
|
||||
penaltyEnd DateTime? @db.Timestamptz(3)
|
||||
run PlayerRun @relation(fields: [runId], references: [id])
|
||||
runId Int
|
||||
activePlayer Player? @relation("ActiveChallenge")
|
||||
moneyUpdate MoneyUpdate?
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user