This commit is contained in:
gpatruno
2026-07-18 17:25:56 +02:00
parent 2614d679c8
commit 2168998679
26 changed files with 2760 additions and 894 deletions
+12
View File
@@ -13,6 +13,7 @@ model User {
passwordHash String
balance BigInt @default(0)
osuBalance Int @default(0)
prBalance Int @default(0)
lastAdAt DateTime?
role String @default("user")
avatarUrl String @default("")
@@ -23,6 +24,15 @@ model User {
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)
lastConnection DateTime?
playTimeSeconds BigInt @default(0)
createdAt DateTime @default(now())
@@ -56,6 +66,7 @@ model Item {
name String
imageUrl String @default("")
rarity String
category String @default("Misc")
marketValue BigInt
createdAt DateTime @default(now())
cases CaseItem[]
@@ -187,6 +198,7 @@ model PrestigeLog {
id Int @id @default(autoincrement())
userId Int
choice String
prGranted Int @default(0)
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
+18 -18
View File
@@ -4,24 +4,24 @@ import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
const ITEMS = [
{ name: 'Dust Fragment', rarity: 'Consumer', marketValue: 5, imageUrl: '' },
{ name: 'Scrap Token', rarity: 'Consumer', marketValue: 8, imageUrl: '' },
{ name: 'Plain Cap', rarity: 'Consumer', marketValue: 12, imageUrl: '' },
{ name: 'Blue Softpack', rarity: 'Industrial', marketValue: 25, imageUrl: '' },
{ name: 'Steel Badge', rarity: 'Industrial', marketValue: 35, imageUrl: '' },
{ name: 'Signal Chip', rarity: 'Industrial', marketValue: 40, imageUrl: '' },
{ name: 'Azure Coil', rarity: 'MilSpec', marketValue: 80, imageUrl: '' },
{ name: 'Navy Grip', rarity: 'MilSpec', marketValue: 95, imageUrl: '' },
{ name: 'Pulse Meter', rarity: 'MilSpec', marketValue: 110, imageUrl: '' },
{ name: 'Violet Core', rarity: 'Restricted', marketValue: 220, imageUrl: '' },
{ name: 'Phantom Lens', rarity: 'Restricted', marketValue: 280, imageUrl: '' },
{ name: 'Neon Circuit', rarity: 'Restricted', marketValue: 320, imageUrl: '' },
{ name: 'Pink Dynamo', rarity: 'Classified', marketValue: 650, imageUrl: '' },
{ name: 'Ruby Flux', rarity: 'Classified', marketValue: 800, imageUrl: '' },
{ name: 'Crimson Edge', rarity: 'Covert', marketValue: 1800, imageUrl: '' },
{ name: 'Blood Ember', rarity: 'Covert', marketValue: 2400, imageUrl: '' },
{ name: 'Golden Relic', rarity: 'Extraordinary', marketValue: 12000, imageUrl: '' },
{ name: 'Mythic Blade', rarity: 'Extraordinary', marketValue: 25000, imageUrl: '' },
{ name: 'Dust Fragment', rarity: 'Consumer', category: 'Misc', marketValue: 5, imageUrl: '' },
{ name: 'Scrap Token', rarity: 'Consumer', category: 'Misc', marketValue: 8, imageUrl: '' },
{ name: 'Plain Cap', rarity: 'Consumer', category: 'Agent', marketValue: 12, imageUrl: '' },
{ name: 'Blue Softpack', rarity: 'Industrial', category: 'Misc', marketValue: 25, imageUrl: '' },
{ name: 'Steel Badge', rarity: 'Industrial', category: 'Sticker', marketValue: 35, imageUrl: '' },
{ name: 'Signal Chip', rarity: 'Industrial', category: 'Misc', marketValue: 40, imageUrl: '' },
{ name: 'Azure Coil', rarity: 'MilSpec', category: 'SMG', marketValue: 80, imageUrl: '' },
{ name: 'Navy Grip', rarity: 'MilSpec', category: 'Pistol', marketValue: 95, imageUrl: '' },
{ name: 'Pulse Meter', rarity: 'MilSpec', category: 'Rifle', marketValue: 110, imageUrl: '' },
{ name: 'Violet Core', rarity: 'Restricted', category: 'Rifle', marketValue: 220, imageUrl: '' },
{ name: 'Phantom Lens', rarity: 'Restricted', category: 'Sniper', marketValue: 280, imageUrl: '' },
{ name: 'Neon Circuit', rarity: 'Restricted', category: 'SMG', marketValue: 320, imageUrl: '' },
{ name: 'Pink Dynamo', rarity: 'Classified', category: 'Rifle', marketValue: 650, imageUrl: '' },
{ name: 'Ruby Flux', rarity: 'Classified', category: 'Heavy', marketValue: 800, imageUrl: '' },
{ name: 'Crimson Edge', rarity: 'Covert', category: 'Knife', marketValue: 1800, imageUrl: '' },
{ name: 'Blood Ember', rarity: 'Covert', category: 'Knife', marketValue: 2400, imageUrl: '' },
{ name: 'Golden Relic', rarity: 'Extraordinary', category: 'Gloves', marketValue: 12000, imageUrl: '' },
{ name: 'Mythic Blade', rarity: 'Extraordinary', category: 'Knife', marketValue: 25000, imageUrl: '' },
];
async function main() {