Skip to content

Commit

Permalink
Added reason field to PlayerStatValue entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Niilyx committed Sep 11, 2024
1 parent 5d5edef commit 9daf6dc
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ model Player {
member Member? @relation(fields: [memberDiscordId], references: [discordId])
memberDiscordId String? @unique
statValues PlayerStatisticValue[]
statValues PlayerStatisticValue[]
statTransactions PlayerStatisticTransaction[]
}

Expand Down Expand Up @@ -277,10 +277,10 @@ model ApiKey {
model AdminAccess {
id String @id @default(uuid())
name String
name String
nickname String
email String @unique
groups String[]
email String @unique
groups String[]
apiKey ApiKey @relation(fields: [key], references: [key], onDelete: Cascade)
key String @unique
Expand All @@ -293,17 +293,17 @@ enum LogLevel {
}

model Log {
id String @id @default(uuid())
id String @id @default(uuid())
timestamp DateTime @default(now())
message String
level LogLevel
from String?
data String?
serverName String?
serverName String?
gameServerName String?
playerUuid String?
templateName String?
playerUuid String?
templateName String?
}

enum StatisticType {
Expand All @@ -312,11 +312,11 @@ enum StatisticType {
}

model Statistic {
id String @id @default(uuid())
key String
id String @id @default(uuid())
key String
displayName String?
color String @default("&7")
color String @default("&7")
type StatisticType @default(TRANSACTION)
Expand All @@ -325,30 +325,31 @@ model Statistic {
}

model PlayerStatisticTransaction {
id String @id @default(uuid())
id String @id @default(uuid())
player Player @relation(fields: [playerUuid], references: [uuid])
player Player @relation(fields: [playerUuid], references: [uuid])
playerUuid String
statistic Statistic @relation(fields: [statisticId], references: [id])
statistic Statistic @relation(fields: [statisticId], references: [id])
statisticId String
value Int
value Int
reason String?
timestamp DateTime @default(now())
}

model PlayerStatisticValue {
id String @id @default(uuid())
id String @id @default(uuid())
player Player @relation(fields: [playerUuid], references: [uuid])
player Player @relation(fields: [playerUuid], references: [uuid])
playerUuid String
statistic Statistic @relation(fields: [statisticId], references: [id])
statistic Statistic @relation(fields: [statisticId], references: [id])
statisticId String
value Int
value Int
reason String?
updatedAt DateTime @updatedAt
}
}

0 comments on commit 9daf6dc

Please sign in to comment.