1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2024-12-03 19:47:17 +01:00
Bayshore_6r_legacy/prisma/schema.prisma
ghkkk090 ff5774b6a2 some ghost battle feature fixed but still bugged
-Ghost Battle no longer disconnected but still bugged
-Crown Ghost Battle not working (disconnected)
-Dress Up Working and saved
-Ghost Region Map Score Working and Saved
-Search Ghost by Level Working
-Search Ghost by Name not Working (disconnected)
-Change Full Tune Ticket (now default ghostLevel is 10)
-No Ghost Movement Saving
-Add rgRegionMapScore to Car table
2022-07-21 09:06:18 +07:00

186 lines
6.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_URL")
}
model User {
id Int @id @default(autoincrement())
chipId String @unique
accessCode String
cars Car[]
carOrder Int[] // Order of cars
unusedTickets UserItem[]
tutorials Boolean[]
userBanned Boolean @default(false)
bookmarks Int[]
// ScratchSheet ScratchSheet[]
currentSheet Int @default(0)
lastSheet Int @default(0)
}
// Not working yet, removing from schema
// model ScratchSheet {
// id Int @id @default(autoincrement())
// User User @relation(fields: [userId], references: [id])
// userId Int @unique
// squares ScratchSquare[]
// }
// model ScratchSquare {
// id Int @id @default(autoincrement())
// Sheet ScratchSheet @relation(fields: [sheetId], references: [id])
// sheetId Int
// category Int
// itemId Int
// earned Boolean
// }
model UserItem {
dbId Int @id @default(autoincrement())
category Int
itemId Int
User User @relation(fields: [userId], references: [id])
userId Int
}
model Car {
user User @relation(fields: [userId], references: [id])
userId Int
// This is the Car object itself
carId Int @id @default(autoincrement())
name String
manufacturer Int
regionId Int @default(0)
model Int
visualModel Int
customColor Int @default(0)
defaultColor Int
wheel Int @default(0)
wheelColor Int @default(0)
aero Int @default(0)
bonnet Int @default(0)
wing Int @default(0)
mirror Int @default(0)
neon Int @default(0)
trunk Int @default(0)
plate Int @default(0)
plateColor Int @default(0)
plateNumber Int @default(0)
tunePower Int @default(0)
tuneHandling Int @default(0)
title String @default("New Car")
level Int @default(0)
windowSticker Boolean @default(false)
windowStickerString String @default("")
windowStickerFont Int @default(0)
rivalMarker Int @default(0)
aura Int @default(0)
auraMotif Int @default(0)
ghostLevel Int @default(1)
// This is more data about the car
tuningPoints Int @default(0)
odometer Int @default(0)
playCount Int @default(0)
earnedCustomColor Boolean @default(false)
carSettingsDbId Int @unique
settings CarSettings @relation(fields: [carSettingsDbId], references: [dbId])
vsPlayCount Int @default(0)
vsBurstCount Int @default(0)
vsStarCount Int @default(0)
vsCoolOrWild Int @default(0)
vsSmoothOrRough Int @default(0)
vsTripleStarMedals Int @default(0)
vsDoubleStarMedals Int @default(0)
vsSingleStarMedals Int @default(0)
vsPlainMedals Int @default(0)
rgPlayCount Int @default(0)
rgWinCount Int @default(0)
rgTrophy Int @default(0)
rgScore Int @default(0)
rgStamp Int @default(0)
rgAcquireAllCrowns Boolean @default(false)
rgRegionMapScore Int[]
dressupLevel Int @default(0)
dressupPoint Int @default(0)
stPlayCount Int @default(0)
stClearBits Int @default(0)
stClearDivCount Int @default(0)
stClearCount Int @default(0)
stLoseBits BigInt @default(0)
stConsecutiveWins Int @default(0)
stConsecutiveWinsMax Int @default(0)
stCompleted100Episodes Boolean @default(false)
items CarItem[]
carStateDbId Int @unique
state CarState @relation(fields: [carStateDbId], references: [dbId])
TimeAttackRecord TimeAttackRecord[]
}
model CarItem {
dbId Int @id @default(autoincrement())
Car Car @relation(fields: [carId], references: [carId])
carId Int
category Int
itemId Int
amount Int
}
model CarSettings {
dbId Int @id @default(autoincrement())
car Car?
view Boolean @default(true)
transmission Boolean @default(false)
retire Boolean @default(false)
meter Int @default(0)
navigationMap Boolean @default(true)
volume Int @default(1)
bgm Int @default(0)
nameplate Int @default(0)
nameplateColor Int @default(0)
terminalBackground Int @default(0)
}
model CarState {
dbId Int @id @default(autoincrement())
car Car?
hasOpponentGhost Boolean @default(false)
eventJoined Boolean @default(false)
transferred Boolean @default(false)
toBeDeleted Boolean @default(false)
}
model TimeAttackRecord {
dbId Int @id @default(autoincrement())
car Car @relation(fields: [carId], references: [carId])
carId Int
model Int // Car model, literally just the `model` field from Car
time Int
course Int
isMorning Boolean
section1Time Int @map("section1Time")
section2Time Int @map("section2Time")
section3Time Int @map("section3Time")
section4Time Int @map("section4Time")
section5Time Int? @map("section5Time")
section6Time Int? @map("section6Time")
section7Time Int? @map("section7Time")
tunePower Int @default(0) // Car Power
tuneHandling Int @default(0) // Car Handling
}