-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplatoon_schema.prisma
More file actions
102 lines (89 loc) · 2.57 KB
/
splatoon_schema.prisma
File metadata and controls
102 lines (89 loc) · 2.57 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
output = "./generated/splatoon_client"
}
datasource db {
provider = "sqlite"
url = env("SPLATOON_DB_URL")
}
model Rule {
id Int @id
name String
modes ModeOnRule[]
}
model Mode {
id Int @id
name String
maxMembers Int
fessMode Boolean
rules ModeOnRule[]
}
model ModeOnRule {
rule Rule @relation(fields: [ruleId], references: [id])
ruleId Int
mode Mode @relation(fields: [modeId], references: [id])
modeId Int
@@id([ruleId, modeId])
}
model Stage {
id Int @id
name String
releaseSeason Season @relation(fields: [seasonId], references: [id])
seasonId Int
}
model SpecialWeapon {
id Int @id
name String
releaseSeason Season @relation(fields: [seasonId], references: [id])
Weapon Weapon[]
seasonId Int
}
model WeaponType {
id Int @id
name String
Weapon Weapon[]
MainWeapon MainWeapon[]
}
model SubWeapon {
id Int @id
name String
releaseSeason Season @relation(fields: [seasonId], references: [id])
Weapon Weapon[]
seasonId Int
}
model MainWeapon {
id Int @id
name String
weaponType WeaponType @relation(fields: [weaponTypeId], references: [id])
releaseSeason Season @relation(fields: [seasonId], references: [id])
seasonId Int
Weapon Weapon[]
weaponTypeId Int
}
model Weapon {
id Int @id
name String
mainWeapon MainWeapon @relation(fields: [mainWeaponId], references: [id])
subWeapon SubWeapon @relation(fields: [subWeaponId], references: [id])
specialWeapon SpecialWeapon @relation(fields: [specialWeaponId], references: [id])
weaponType WeaponType @relation(fields: [weaponTypeId], references: [id])
releaseSeason Season @relation(fields: [seasonId], references: [id])
subWeaponId Int
specialWeaponId Int
seasonId Int
weaponTypeId Int
mainWeaponId Int
}
model Season {
id Int @id
name String
startDate DateTime
endDate DateTime
Weapon Weapon[]
Stage Stage[]
SpecialWeapon SpecialWeapon[]
SubWeapon SubWeapon[]
MainWeapon MainWeapon[]
}