1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
1
generator client {
5
2
provider = " prisma-client-js "
6
3
}
@@ -11,32 +8,31 @@ datasource db {
11
8
}
12
9
13
10
model Typhoon {
14
- typhoon_id Int @id
15
- name String @db.VarChar (30 )
16
- start_date DateTime
17
- end_date DateTime ?
18
- created_at DateTime @default (now () )
19
- updated_at DateTime @default (now () ) @updatedAt
20
-
11
+ typhoon_id Int @id
12
+ name String @db.VarChar (30 )
13
+ start_date DateTime
14
+ end_date DateTime ?
15
+ created_at DateTime @default (now () )
16
+ updated_at DateTime @default (now () ) @updatedAt
17
+ around_weathers TyphoonAroundWeather []
21
18
historical_details TyphoonDetail []
22
- arrounds TyphoonAroundWeather []
23
19
24
20
@@map (" typhoons " )
25
21
}
26
22
27
23
model TyphoonDetail {
28
- typhoon_id Int
29
- observation_date DateTime
30
- central_longitude Float
31
- central_latitude Float
32
- central_pressure Float
24
+ typhoon_id Int
25
+ observation_date DateTime
26
+ central_longitude Float
27
+ central_latitude Float
28
+ central_pressure Float
29
+ wind_radius Float ?
30
+ grade Int
31
+ created_at DateTime @default (now () )
32
+ updated_at DateTime @default (now () ) @updatedAt
33
33
maximum_wind_speed Float
34
- wind_radius Float ?
35
- grade Int
36
- created_at DateTime @default (now () )
37
- updated_at DateTime @default (now () ) @updatedAt
38
-
39
- typhoon Typhoon @relation (fields : [typhoon_id ] , references : [typhoon_id ] )
34
+ around_weathers TyphoonAroundWeather []
35
+ typhoon Typhoon @relation (fields : [typhoon_id ] , references : [typhoon_id ] )
40
36
41
37
@@id ([typhoon_id , observation_date ] )
42
38
@@map (" typhoon_details " )
@@ -59,10 +55,10 @@ model TyphoonAroundWeather {
59
55
winddirection_10m Float ?
60
56
winddirection_100m Float ?
61
57
windgusts_10m Float ?
62
- created_at DateTime @default (now () )
63
- updated_at DateTime @default (now () ) @updatedAt
64
-
65
- typhoon Typhoon @relation (fields : [typhoon_id ] , references : [typhoon_id ] )
58
+ created_at DateTime @default (now () )
59
+ updated_at DateTime @default (now () ) @updatedAt
60
+ typhoon Typhoon @relation ( fields : [ typhoon_id ] , references : [ typhoon_id ] )
61
+ typhoon_detail TyphoonDetail @relation (fields : [typhoon_id , observation_date ] , references : [typhoon_id , observation_date ] )
66
62
67
63
@@id ([typhoon_id , observation_date , point ] )
68
64
@@map (" typhoon_around_weathers " )
0 commit comments