-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
124 lines (117 loc) · 3.02 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
generator db {
provider = "prisma-client-py"
interface = "asyncio"
}
datasource db {
provider = "sqlite"
url = "file:db.sqlite3"
}
model Film {
id Int @id
title String
episode_id Int
opening_crawl String
director String
producers String
release_date DateTime
created DateTime
edited DateTime
characters Person[]
species Species[]
starships Starship[]
vehicles Vehicle[]
planets Planet[]
}
model Person {
id Int @id
name String
height Int?
mass Float?
eye_color String
birth_year String
gender String
hair_color String
skin_color String
created DateTime
edited DateTime
homeworld_id Int
homeworld Planet @relation(fields: [homeworld_id], references: [id])
species_id Int?
species Species? @relation(fields: [species_id], references: [id])
films Film[]
starships Starship[]
vehicles Vehicle[]
}
model Planet {
id Int @id
name String
diameter Int?
rotation_period Int?
orbital_period Int?
gravity String?
population Float?
climates String
terrains String
surface_water Float?
created DateTime
edited DateTime
people Person[]
films Film[]
Species Species[]
}
model Species {
id Int @id
name String
classification String
designation String
average_height Float?
average_lifespan Int?
eye_colors String
hair_colors String
skin_colors String
language String
created DateTime
edited DateTime
people Person[]
films Film[]
homeworld_id Int?
homeworld Planet? @relation(fields: [homeworld_id], references: [id])
}
model Vehicle {
id Int @id
name String
model String
vehicle_class String
manufacturers String
cost_in_credits Float?
length Float?
crew String
passengers String
max_atmosphering_speed Int?
cargo_capacity Float?
consumables String
created DateTime
edited DateTime
pilots Person[]
films Film[]
}
model Starship {
id Int @id
name String
model String
starship_class String
manufacturers String
cost_in_credits Float?
length Float?
crew String
passengers String
max_atmosphering_speed Int?
hyperdrive_rating Float?
MGLT Int?
cargo_capacity Float?
consumables String
created DateTime
edited DateTime
pilots Person[]
films Film[]
}