Add prisma schema (and update)
This commit is contained in:
155
prisma/schema.prisma
Normal file
155
prisma/schema.prisma
Normal file
@@ -0,0 +1,155 @@
|
||||
generator client {
|
||||
provider = "prisma-client"
|
||||
output = "../generated/prisma"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
}
|
||||
|
||||
model Appeal {
|
||||
approved Boolean?
|
||||
ban_reason String
|
||||
created_at DateTime @default(now())
|
||||
id String @id @unique
|
||||
learned String
|
||||
reason_for_unban String
|
||||
user Json
|
||||
|
||||
@@index([approved, created_at], name: "idx_appeals_approved_created_at")
|
||||
@@map("appeals")
|
||||
}
|
||||
|
||||
model AppealBan {
|
||||
created_at DateTime @default(now())
|
||||
created_by String
|
||||
user String @id @unique
|
||||
|
||||
@@map("appeal_bans")
|
||||
}
|
||||
|
||||
model EtMember {
|
||||
created_at DateTime @default(now())
|
||||
created_by String
|
||||
id String @id @unique
|
||||
is_management Boolean @default(false)
|
||||
name String
|
||||
points Int @default(0)
|
||||
roblox_id Int?
|
||||
|
||||
@@index([id, name], name: "idx_et_members_id_name")
|
||||
@@map("et_members")
|
||||
}
|
||||
|
||||
model EtStrike {
|
||||
created_at DateTime @default(now())
|
||||
created_by String
|
||||
id String @id @unique
|
||||
reason String
|
||||
user String
|
||||
|
||||
@@map("et_strikes")
|
||||
}
|
||||
|
||||
model Event {
|
||||
answer String?
|
||||
answered_at DateTime?
|
||||
approved Boolean @default(false)
|
||||
created_at DateTime @default(now())
|
||||
created_by String
|
||||
day Int
|
||||
details String
|
||||
id String @id @unique
|
||||
month Int
|
||||
pending Boolean @default(true)
|
||||
performed_at DateTime?
|
||||
reached_minimum_player_count Boolean @default(false)
|
||||
type String
|
||||
year Int
|
||||
|
||||
@@index([month, year], name: "idx_events_month_year")
|
||||
@@map("events")
|
||||
}
|
||||
|
||||
model GameAppeal {
|
||||
created_at DateTime @default(now())
|
||||
id String @id @unique
|
||||
reason_for_unban String
|
||||
roblox_id Int
|
||||
roblox_username String
|
||||
type String
|
||||
what_happened String
|
||||
|
||||
@@index([created_at], name: "idx_game_appeals_created_at")
|
||||
@@map("game_appeals")
|
||||
}
|
||||
|
||||
model GameModLog {
|
||||
action String
|
||||
evidence String
|
||||
executed_at DateTime @default(now())
|
||||
executor String
|
||||
id String @id @unique
|
||||
target Int
|
||||
|
||||
@@index([target], name: "idx_game_mod_logs_target")
|
||||
@@map("game_mod_logs")
|
||||
}
|
||||
|
||||
model GameModNote {
|
||||
content String
|
||||
created_at DateTime @default(now())
|
||||
created_by String
|
||||
id String @id @unique
|
||||
target Int
|
||||
|
||||
@@index([target], name: "idx_game_mod_notes_target")
|
||||
@@map("game_mod_notes")
|
||||
}
|
||||
|
||||
model InactivityNotice {
|
||||
created_at DateTime @default(now())
|
||||
decisions Json
|
||||
departments Json @default("[]")
|
||||
end String
|
||||
hiatus Boolean @default(false)
|
||||
id String @id @unique
|
||||
reason String
|
||||
start String
|
||||
user Json
|
||||
|
||||
@@index([end, start], name: "idx_inactivity_notices_end_start")
|
||||
@@map("inactivity_notices")
|
||||
}
|
||||
|
||||
model PushNotification {
|
||||
created_at DateTime @default(now())
|
||||
event_id String @unique
|
||||
event_type String
|
||||
token String
|
||||
|
||||
@@map("push_notifications")
|
||||
}
|
||||
|
||||
model Report {
|
||||
attachments Json @default("[]")
|
||||
created_at DateTime @default(now())
|
||||
id String @id @unique
|
||||
open Boolean @default(true)
|
||||
target_ids Json @default("[]")
|
||||
target_usernames Json @default("[]")
|
||||
type String @default("exploit")
|
||||
user Json?
|
||||
|
||||
@@index([created_at, open], name: "idx_reports_created_at_open")
|
||||
@@map("reports")
|
||||
}
|
||||
|
||||
model ShortLink {
|
||||
created_at DateTime @default(now())
|
||||
destination String
|
||||
path String @unique
|
||||
user String
|
||||
|
||||
@@map("short_links")
|
||||
}
|
||||
Reference in New Issue
Block a user