mahjong_service/db_storage/
schema.rs1diesel::table! {
4 auth_info (user_id) {
5 provider -> Text,
6 role -> Text,
7 user_id -> Text,
8 }
9}
10
11diesel::table! {
12 auth_info_anonymous (user_id) {
13 hashed_token -> Text,
14 user_id -> Text,
15 }
16}
17
18diesel::table! {
19 auth_info_email (user_id) {
20 hashed_pass -> Text,
21 user_id -> Text,
22 username -> Text,
23 }
24}
25
26diesel::table! {
27 auth_info_github (user_id) {
28 token -> Nullable<Text>,
29 user_id -> Text,
30 username -> Text,
31 }
32}
33
34diesel::table! {
35 auth_info_providers (id) {
36 id -> Text,
37 }
38}
39
40diesel::table! {
41 game (id) {
42 created_at -> Timestamp,
43 id -> Text,
44 name -> Text,
45 phase -> Text,
46 round_claimed_by -> Nullable<Text>,
47 round_claimed_from -> Nullable<Text>,
48 round_claimed_id -> Nullable<Int4>,
49 round_consecutive_same_seats -> Int4,
50 round_dealer_index -> Int4,
51 round_east_player_index -> Int4,
52 round_index -> Int4,
53 round_initial_winds -> Nullable<Int4>,
54 round_player_index -> Int4,
55 round_wall_tile_drawn -> Nullable<Int4>,
56 round_wind -> Text,
57 #[max_length = 255]
58 style -> Varchar,
59 updated_at -> Timestamp,
60 version -> Text,
61 }
62}
63
64diesel::table! {
65 game_board (game_id, tile_id) {
66 game_id -> Text,
67 tile_id -> Int4,
68 tile_index -> Int4,
69 }
70}
71
72diesel::table! {
73 game_draw_wall (game_id, tile_id, place) {
74 game_id -> Text,
75 tile_id -> Int4,
76 tile_index -> Int4,
77 place -> Text,
78 }
79}
80
81diesel::table! {
82 game_hand (game_id, tile_id) {
83 concealed -> Int4,
84 game_id -> Text,
85 player_id -> Text,
86 set_id -> Nullable<Text>,
87 tile_id -> Int4,
88 tile_index -> Int4,
89 is_kong -> Bool,
90 }
91}
92
93diesel::table! {
94 game_player (game_id, player_id) {
95 game_id -> Text,
96 player_id -> Text,
97 player_index -> Int4,
98 }
99}
100
101diesel::table! {
102 game_score (game_id, player_id) {
103 game_id -> Text,
104 player_id -> Text,
105 score -> Int4,
106 }
107}
108
109diesel::table! {
110 game_settings (game_id) {
111 ai_enabled -> Bool,
112 auto_sort_players -> Text,
113 auto_stop_claim_meld -> Text,
114 discard_wait_ms -> Nullable<Int4>,
115 fixed_settings -> Bool,
116 game_id -> Text,
117 last_discard_time -> Int8,
118 dead_wall -> Bool,
119 }
120}
121
122diesel::table! {
123 player (id) {
124 created_at -> Timestamp,
125 id -> Text,
126 is_ai -> Int4,
127 name -> Text,
128 }
129}
130
131diesel::joinable!(auth_info -> auth_info_providers (provider));
132diesel::joinable!(auth_info -> player (user_id));
133diesel::joinable!(auth_info_anonymous -> auth_info (user_id));
134diesel::joinable!(auth_info_email -> auth_info (user_id));
135diesel::joinable!(auth_info_github -> auth_info (user_id));
136diesel::joinable!(game_board -> game (game_id));
137diesel::joinable!(game_draw_wall -> game (game_id));
138diesel::joinable!(game_hand -> game (game_id));
139diesel::joinable!(game_hand -> player (player_id));
140diesel::joinable!(game_player -> game (game_id));
141diesel::joinable!(game_player -> player (player_id));
142diesel::joinable!(game_score -> game (game_id));
143diesel::joinable!(game_score -> player (player_id));
144diesel::joinable!(game_settings -> game (game_id));
145
146diesel::allow_tables_to_appear_in_same_query!(
147 auth_info,
148 auth_info_anonymous,
149 auth_info_email,
150 auth_info_github,
151 auth_info_providers,
152 game,
153 game_board,
154 game_draw_wall,
155 game_hand,
156 game_player,
157 game_score,
158 game_settings,
159 player,
160);