-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
schema.prisma
57 lines (50 loc) · 1.84 KB
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
datasource db {
provider = "postgresql"
url = env("DB_URL")
}
generator client {
provider = "prisma-client-py"
previewFeatures = ["nativeDistinct", "relationJoins"]
interface = "asyncio"
recursive_type_depth = -1
partial_type_generator = "common/partials.py"
}
model GuildConfig {
guild_id BigInt @id @default(autoincrement())
club_id String? @db.VarChar(50)
playerlist_chan BigInt?
realm_id String? @db.VarChar(50)
live_playerlist Boolean @default(false)
realm_offline_role BigInt?
warning_notifications Boolean @default(true)
premium_code_id Int?
fetch_devices Boolean @default(false)
live_online_channel String? @db.VarChar(75)
player_watchlist_role BigInt?
player_watchlist String[] @default([])
notification_channels Json @default("{}") @db.JsonB
reoccurring_leaderboard Int?
nicknames Json @default("{}") @db.JsonB
premium_code PremiumCode? @relation(fields: [premium_code_id], references: [id], onUpdate: NoAction)
@@map("realmguildconfig")
}
model PlayerSession {
custom_id String @id @db.Uuid
realm_id String @db.VarChar(50)
xuid String @db.VarChar(50)
online Boolean @default(false)
last_seen DateTime @db.Timestamptz(6)
joined_at DateTime? @db.Timestamptz(6)
@@map("realmplayersession")
}
model PremiumCode {
id Int @id @default(autoincrement())
code String @db.VarChar(100)
user_id BigInt?
uses Int @default(0)
max_uses Int @default(2)
customer_id String? @db.VarChar(50)
expires_at DateTime? @db.Timestamptz(6)
guilds GuildConfig[]
@@map("realmpremiumcode")
}