generated from nhcarrigan/template
298e1f4604
Introduce six lifetime stat fields (gold, clicks, bosses, quests, adventurers, achievements) that accumulate across all prestige and transcendence resets and are never cleared. - schema: add six new Float fields to the Player model - prestige route: capture current-run totals and increment lifetime fields before resetting per-run counters to zero - profile route: return lifetime fields as the All Time section data; add four new ProfileSettings toggles for visibility control - ProfilePage: display lifetime bosses/quests/adventurers/achievements in All Time section; remove GameProvider dependency by importing formatNumber directly (fixes crash on public profile pages) - EditProfileModal: add four new All Time stat toggles - types: update Player, ProfileSettings, and PublicProfileResponse
38 lines
1019 B
Plaintext
38 lines
1019 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mongodb"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Player {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
discordId String @unique
|
|
username String
|
|
discriminator String
|
|
avatar String?
|
|
characterName String @default("")
|
|
bio String @default("")
|
|
profileSettings Json?
|
|
createdAt Float
|
|
lastSavedAt Float
|
|
totalGoldEarned Float @default(0)
|
|
totalClicks Float @default(0)
|
|
lifetimeGoldEarned Float @default(0)
|
|
lifetimeClicks Float @default(0)
|
|
lifetimeBossesDefeated Float @default(0)
|
|
lifetimeQuestsCompleted Float @default(0)
|
|
lifetimeAdventurersRecruited Float @default(0)
|
|
lifetimeAchievementsUnlocked Float @default(0)
|
|
}
|
|
|
|
model GameState {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
discordId String @unique
|
|
state Json
|
|
updatedAt Float
|
|
}
|
|
|