Files
rs-sdk/server/engine/prisma/singleworld/schema.prisma
T

255 lines
4.5 KiB
Plaintext

generator kysely {
provider = "prisma-kysely"
output = "../../src/db"
fileName = "types.ts"
enumFileName = "enums.ts"
}
datasource db {
provider = "sqlite"
url = "file:../../db.sqlite"
}
model ipban {
ip String @id
}
model account {
id Int @id @default(autoincrement())
username String @unique
password String
registration_ip String?
registration_date DateTime @default(now())
muted_until DateTime?
banned_until DateTime?
staffmodlevel Int @default(0)
members Boolean @default(false)
}
model account_login {
account_id Int
profile String
logged_in Int @default(0)
login_time DateTime?
logged_out Int @default(0)
logout_time DateTime?
@@id([profile, account_id])
}
model hiscore {
account_id Int
profile String @default("main")
type Int
level Int
value Int
playtime Int @default(0)
date DateTime @default(now()) @updatedAt
@@id([profile, type, account_id])
@@index([profile, type, level(sort: Desc), playtime, account_id], map: "hiscore_rank")
}
model hiscore_large {
account_id Int
profile String @default("main")
type Int
level Int
value BigInt
playtime Int @default(0)
date DateTime @default(now()) @updatedAt
@@id([profile, type, account_id])
@@index([profile, type, level(sort: Desc), playtime, account_id], map: "hiscore_large_rank")
}
model hiscore_outfit {
profile String @default("main")
account_id Int
value Int
items String
appearance String?
date DateTime @default(now()) @updatedAt
@@id([profile, account_id])
}
model hiscore_bank {
profile String @default("main")
account_id Int
value Int
items String
date DateTime @default(now()) @updatedAt
@@id([profile, account_id])
}
model friendlist {
account_id Int
friend_account_id Int
profile String @default("main")
created DateTime @default(now())
@@id([profile, account_id, friend_account_id])
}
model ignorelist {
account_id Int
value String
profile String @default("main")
created DateTime @default(now())
@@id([profile, account_id, value])
}
model session {
uuid String @id
account_id Int
profile String
world Int
timestamp DateTime
uid Int
ip String?
}
model session_log {
id Int @id @default(autoincrement())
session_uuid String
timestamp DateTime
coord Int
event String
event_type Int @default(-1)
}
model session_wealth {
id Int @id @default(autoincrement())
session_uuid String
timestamp DateTime
coord Int
event_type Int @default(-1)
account_items String
account_value Int
recipient_session String?
recipient_items String?
recipient_value Int?
}
model player_telemetry {
id Int @id @default(autoincrement())
timestamp DateTime
username String
session_uuid String?
x Int
z Int
level Int
ip String?
total_xp Int @default(0)
skills String?
@@index([username, timestamp])
@@index([timestamp])
}
model player_telemetry_segment {
id Int @id @default(autoincrement())
username String
session_uuid String?
ip String?
start_time DateTime
end_time DateTime
sample_count Int
data Bytes
@@index([username, start_time])
@@index([start_time])
}
model player_skills_log {
id Int @id @default(autoincrement())
timestamp DateTime
username String
total_xp Int
skills String
@@index([username, timestamp])
}
model runite_mine {
id Int @id @default(autoincrement())
timestamp DateTime
profile String @default("main")
username String
@@index([timestamp])
}
model public_chat {
id Int @id @default(autoincrement())
session_uuid String
timestamp DateTime
coord Int
message String
}
model private_chat {
id Int @id @default(autoincrement())
account_id Int
profile String
timestamp DateTime
coord Int
to_account_id Int
message String
}
model report {
id Int @id @default(autoincrement())
session_uuid String
timestamp DateTime
coord Int
offender String
reason Int
}
model input_report {
id Int @id @default(autoincrement())
session_uuid String
timestamp DateTime
data Bytes
}