update nice visuel
This commit is contained in:
+58
-52
@@ -11,29 +11,21 @@ model User {
|
||||
id Int @id @default(autoincrement())
|
||||
username String @unique
|
||||
passwordHash String
|
||||
balance BigInt @default(0)
|
||||
balance String @default("0")
|
||||
osuBalance Int @default(0)
|
||||
prBalance Int @default(0)
|
||||
prBalance String @default("0")
|
||||
lastAdAt DateTime?
|
||||
role String @default("user")
|
||||
avatarUrl String @default("")
|
||||
bio String @default("")
|
||||
autoSellEnabled Boolean @default(false)
|
||||
autoSellThresholdCents BigInt @default(1000)
|
||||
autoSellThresholdCents String @default("1000")
|
||||
prestigeCount Int @default(0)
|
||||
prestigeChanceBonus Int @default(0)
|
||||
prestigeGainBonus Int @default(0)
|
||||
prestigeKeyOpenReduction Int @default(0)
|
||||
prestigeStartBonus Int @default(0)
|
||||
prestigeAdBonus Int @default(0)
|
||||
prestigeAdCooldownReduction Int @default(0)
|
||||
prestigeWearBonus Int @default(0)
|
||||
prestigePrBonus Int @default(0)
|
||||
prestigeShopDiscount Int @default(0)
|
||||
prestigeStartOsu Int @default(0)
|
||||
prestigeDropValueBonus Int @default(0)
|
||||
prestigeOpenBonus Int @default(0)
|
||||
prestigeCaseDiscount Int @default(0)
|
||||
prestigeQualityBonus Int @default(0)
|
||||
prestigeAnimReduction Int @default(0)
|
||||
prestigeRefundChance Int @default(0)
|
||||
@@ -41,27 +33,46 @@ model User {
|
||||
prestigeVaultSlots Int @default(0)
|
||||
prestigeOfflineYield Int @default(0)
|
||||
prestigeOnlineYield Int @default(0)
|
||||
vaultYieldAt DateTime?
|
||||
lastConnection DateTime?
|
||||
playTimeSeconds BigInt @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
inventory InventoryItem[]
|
||||
transactions Transaction[]
|
||||
jackpotWins JackpotRound[] @relation("JackpotWinner")
|
||||
jackpotCreated JackpotRound[] @relation("JackpotCreator")
|
||||
jackpotDeposits JackpotDeposit[]
|
||||
duelRoomsCreated DuelRoom[] @relation("DuelCreator")
|
||||
duelWins DuelRoom[] @relation("DuelWinner")
|
||||
duelDeposits DuelDeposit[]
|
||||
caseKeyProgress CaseKeyProgress[]
|
||||
catalogEntries CatalogEntry[]
|
||||
prestigeLogs PrestigeLog[]
|
||||
achievements UserAchievement[]
|
||||
paymentOrders PaymentOrder[]
|
||||
}
|
||||
|
||||
model PaymentOrder {
|
||||
id String @id @default(cuid())
|
||||
userId Int
|
||||
packId String
|
||||
osuAmount Int
|
||||
priceCents Int
|
||||
currency String @default("eur")
|
||||
status String @default("pending")
|
||||
provider String @default("mock")
|
||||
providerRef String @default("")
|
||||
meta String @default("{}")
|
||||
createdAt DateTime @default(now())
|
||||
paidAt DateTime?
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId, status])
|
||||
@@index([providerRef])
|
||||
}
|
||||
|
||||
model Case {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
imageUrl String @default("")
|
||||
price BigInt
|
||||
price String @default("0")
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
items CaseItem[]
|
||||
@@ -81,7 +92,7 @@ model Item {
|
||||
imageUrl String @default("")
|
||||
rarity String
|
||||
category String @default("Misc")
|
||||
marketValue BigInt
|
||||
marketValue String @default("0")
|
||||
createdAt DateTime @default(now())
|
||||
cases CaseItem[]
|
||||
inventory InventoryItem[]
|
||||
@@ -110,20 +121,19 @@ model InventoryItem {
|
||||
floatValue Float @default(0.265)
|
||||
wear String @default("Field-Tested")
|
||||
paintSeed Int @default(0)
|
||||
valueCents BigInt @default(0)
|
||||
valueCents String @default("0")
|
||||
favorite Boolean @default(false)
|
||||
obtainedAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
item Item @relation(fields: [itemId], references: [id], onDelete: Cascade)
|
||||
jackpotDeposits JackpotDeposit[]
|
||||
duelDeposits DuelDeposit[]
|
||||
}
|
||||
|
||||
model Transaction {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
type String
|
||||
amount BigInt
|
||||
amount String
|
||||
meta String @default("{}")
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
@@ -133,11 +143,15 @@ model JackpotRound {
|
||||
id Int @id @default(autoincrement())
|
||||
status String @default("open")
|
||||
endsAt DateTime
|
||||
creatorId Int?
|
||||
winnerUserId Int?
|
||||
createdAt DateTime @default(now())
|
||||
resolvedAt DateTime?
|
||||
creator User? @relation("JackpotCreator", fields: [creatorId], references: [id])
|
||||
winner User? @relation("JackpotWinner", fields: [winnerUserId], references: [id])
|
||||
deposits JackpotDeposit[]
|
||||
|
||||
@@index([status])
|
||||
}
|
||||
|
||||
model JackpotDeposit {
|
||||
@@ -145,7 +159,7 @@ model JackpotDeposit {
|
||||
roundId Int
|
||||
userId Int
|
||||
inventoryItemId Int
|
||||
valueCents BigInt
|
||||
valueCents String
|
||||
createdAt DateTime @default(now())
|
||||
round JackpotRound @relation(fields: [roundId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
@@ -154,37 +168,6 @@ model JackpotDeposit {
|
||||
@@unique([roundId, inventoryItemId])
|
||||
}
|
||||
|
||||
model DuelRoom {
|
||||
id Int @id @default(autoincrement())
|
||||
creatorId Int
|
||||
status String @default("open")
|
||||
maxPlayers Int
|
||||
maxItemsPerPlayer Int
|
||||
minItemValue BigInt @default(0)
|
||||
minPlayersToStart Int @default(2)
|
||||
winnerUserId Int?
|
||||
createdAt DateTime @default(now())
|
||||
startedAt DateTime?
|
||||
resolvedAt DateTime?
|
||||
creator User @relation("DuelCreator", fields: [creatorId], references: [id], onDelete: Cascade)
|
||||
winner User? @relation("DuelWinner", fields: [winnerUserId], references: [id])
|
||||
deposits DuelDeposit[]
|
||||
}
|
||||
|
||||
model DuelDeposit {
|
||||
id Int @id @default(autoincrement())
|
||||
roomId Int
|
||||
userId Int
|
||||
inventoryItemId Int
|
||||
valueCents BigInt
|
||||
createdAt DateTime @default(now())
|
||||
room DuelRoom @relation(fields: [roomId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
inventoryItem InventoryItem @relation(fields: [inventoryItemId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([roomId, inventoryItemId])
|
||||
}
|
||||
|
||||
model CaseKeyProgress {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
@@ -215,7 +198,7 @@ model PrestigeLog {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int
|
||||
choice String
|
||||
prGranted Int @default(0)
|
||||
prGranted String @default("0")
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
@@ -241,3 +224,26 @@ model UserAchievement {
|
||||
|
||||
@@unique([userId, achievementId])
|
||||
}
|
||||
|
||||
/** Key/value app settings (e.g. shop.osuTopupsEnabled). */
|
||||
model AppSetting {
|
||||
key String @id
|
||||
value String
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
/** Configurable real-money → osu packs for the shop. */
|
||||
model ShopOsuPack {
|
||||
id String @id
|
||||
name String
|
||||
osu Int
|
||||
priceCents Int
|
||||
currency String @default("eur")
|
||||
badge String @default("")
|
||||
blurb String @default("")
|
||||
perOsuLabel String @default("")
|
||||
enabled Boolean @default(true)
|
||||
sortOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user