tof_dataclasses/database/
schema.rs

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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// @generated automatically by Diesel CLI.

diesel::table! {
    auth_group (id) {
        id -> Integer,
        name -> Text,
    }
}

diesel::table! {
    auth_group_permissions (id) {
        id -> Integer,
        group_id -> Integer,
        permission_id -> Integer,
    }
}

diesel::table! {
    auth_permission (id) {
        id -> Integer,
        content_type_id -> Integer,
        codename -> Text,
        name -> Text,
    }
}

diesel::table! {
    auth_user (id) {
        id -> Integer,
        password -> Text,
        last_login -> Nullable<Timestamp>,
        is_superuser -> Bool,
        username -> Text,
        last_name -> Text,
        email -> Text,
        is_staff -> Bool,
        is_active -> Bool,
        date_joined -> Timestamp,
        first_name -> Text,
    }
}

diesel::table! {
    auth_user_groups (id) {
        id -> Integer,
        user_id -> Integer,
        group_id -> Integer,
    }
}

diesel::table! {
    auth_user_user_permissions (id) {
        id -> Integer,
        user_id -> Integer,
        permission_id -> Integer,
    }
}

diesel::table! {
    django_admin_log (id) {
        id -> Integer,
        object_id -> Nullable<Text>,
        object_repr -> Text,
        action_flag -> SmallInt,
        change_message -> Text,
        content_type_id -> Nullable<Integer>,
        user_id -> Integer,
        action_time -> Timestamp,
    }
}

diesel::table! {
    django_content_type (id) {
        id -> Integer,
        app_label -> Text,
        model -> Text,
    }
}

diesel::table! {
    django_migrations (id) {
        id -> Integer,
        app -> Text,
        name -> Text,
        applied -> Timestamp,
    }
}

diesel::table! {
    django_session (session_key) {
        session_key -> Text,
        session_data -> Text,
        expire_date -> Timestamp,
    }
}

diesel::table! {
    tof_db_dsicard (dsi_id) {
        dsi_id -> SmallInt,
        j1_rat_id -> Nullable<SmallInt>,
        j2_rat_id -> Nullable<SmallInt>,
        j3_rat_id -> Nullable<SmallInt>,
        j4_rat_id -> Nullable<SmallInt>,
        j5_rat_id -> Nullable<SmallInt>,
    }
}

diesel::table! {
    tof_db_run (run_id) {
        run_id       -> BigInt,
        runtime_secs -> Nullable<BigInt>,
        calib_before -> Nullable<Bool>,
        shifter      -> Nullable<SmallInt>,
        run_type     -> Nullable<SmallInt>,
        run_path     -> Nullable<Text>,
    }
}

diesel::table! {
    tof_db_localtriggerboard (board_id) {
        board_id -> SmallInt,
        dsi -> Nullable<SmallInt>,
        j -> Nullable<SmallInt>,
        rat -> Nullable<SmallInt>,
        ltb_id -> Nullable<SmallInt>,
        cable_len -> Float,
        paddle1_id -> Nullable<SmallInt>,
        paddle2_id -> Nullable<SmallInt>,
        paddle3_id -> Nullable<SmallInt>,
        paddle4_id -> Nullable<SmallInt>,
        paddle5_id -> Nullable<SmallInt>,
        paddle6_id -> Nullable<SmallInt>,
        paddle7_id -> Nullable<SmallInt>,
        paddle8_id -> Nullable<SmallInt>,
    }
}

diesel::table! {
    tof_db_mtbchannel (mtb_ch) {
        mtb_ch -> BigInt,
        dsi -> Nullable<SmallInt>,
        j -> Nullable<SmallInt>,
        ltb_id -> Nullable<SmallInt>,
        ltb_ch -> Nullable<SmallInt>,
        rb_id -> Nullable<SmallInt>,
        rb_ch -> Nullable<SmallInt>,
        mtb_link_id -> Nullable<SmallInt>,
        paddle_id -> Nullable<SmallInt>,
        paddle_isA -> Nullable<Bool>,
        hg_ch -> Nullable<SmallInt>,
        lg_ch -> Nullable<SmallInt>,
    }
}

diesel::table! {
    tof_db_paddle (paddle_id) {
        paddle_id         -> SmallInt,
        volume_id         -> BigInt,
        panel_id          -> SmallInt,
        mtb_link_id       -> SmallInt,
        rb_id             -> SmallInt,
        rb_chA            -> SmallInt,
        rb_chB            -> SmallInt,
        ltb_id            -> SmallInt,
        ltb_chA           -> SmallInt,
        ltb_chB           -> SmallInt,
        pb_id             -> SmallInt,
        pb_chA            -> SmallInt,
        pb_chB            -> SmallInt,
        cable_len         -> Float,
        dsi               -> SmallInt,
        j_rb              -> SmallInt,
        j_ltb             -> SmallInt,
        height            -> Float,
        width             -> Float,
        length            -> Float,
        normal_x          -> Float,
        normal_y          -> Float,
        normal_z          -> Float,
        global_pos_x_l0   -> Float,
        global_pos_y_l0   -> Float,
        global_pos_z_l0   -> Float,
        global_pos_x_l0_A -> Float,
        global_pos_y_l0_A -> Float,
        global_pos_z_l0_A -> Float,
        global_pos_x_l0_B -> Float,
        global_pos_y_l0_B -> Float,
        global_pos_z_l0_B -> Float,
    }
}

diesel::table! {
    tof_db_panel (panel_id) {
        panel_id -> SmallInt,
        description -> Text,
        normal_x -> SmallInt,
        normal_y -> SmallInt,
        normal_z -> SmallInt,
        dw_paddle -> Nullable<SmallInt>,
        dh_paddle -> Nullable<SmallInt>,
        paddle0_id -> Nullable<SmallInt>,
        paddle1_id -> Nullable<SmallInt>,
        paddle10_id -> Nullable<SmallInt>,
        paddle11_id -> Nullable<SmallInt>,
        paddle2_id -> Nullable<SmallInt>,
        paddle3_id -> Nullable<SmallInt>,
        paddle4_id -> Nullable<SmallInt>,
        paddle5_id -> Nullable<SmallInt>,
        paddle6_id -> Nullable<SmallInt>,
        paddle7_id -> Nullable<SmallInt>,
        paddle8_id -> Nullable<SmallInt>,
        paddle9_id -> Nullable<SmallInt>,
    }
}

diesel::table! {
    tof_db_rat (rat_id) {
        rat_id -> SmallInt,
        pb_id -> SmallInt,
        rb1_id -> SmallInt,
        rb2_id -> SmallInt,
        ltb_id -> SmallInt,
        ltb_harting_cable_length -> SmallInt,
    }
}

diesel::table! {
    tof_db_readoutboard (rb_id) {
        rb_id -> SmallInt,
        dsi -> SmallInt,
        j -> SmallInt,
        mtb_link_id -> SmallInt,
        paddle12_chA -> Nullable<SmallInt>,
        paddle34_chA -> Nullable<SmallInt>,
        paddle56_chA -> Nullable<SmallInt>,
        paddle78_chA -> Nullable<SmallInt>,
        paddle12_id -> Nullable<SmallInt>,
        paddle34_id -> Nullable<SmallInt>,
        paddle56_id -> Nullable<SmallInt>,
        paddle78_id -> Nullable<SmallInt>,
    }
}


diesel::joinable!(auth_group_permissions -> auth_group (group_id));
diesel::joinable!(auth_group_permissions -> auth_permission (permission_id));
diesel::joinable!(auth_permission -> django_content_type (content_type_id));
diesel::joinable!(auth_user_groups -> auth_group (group_id));
diesel::joinable!(auth_user_groups -> auth_user (user_id));
diesel::joinable!(auth_user_user_permissions -> auth_permission (permission_id));
diesel::joinable!(auth_user_user_permissions -> auth_user (user_id));
diesel::joinable!(django_admin_log -> auth_user (user_id));
diesel::joinable!(django_admin_log -> django_content_type (content_type_id));

diesel::allow_tables_to_appear_in_same_query!(
    auth_group,
    auth_group_permissions,
    auth_permission,
    auth_user,
    auth_user_groups,
    auth_user_user_permissions,
    django_admin_log,
    django_content_type,
    django_migrations,
    django_session,
    tof_db_dsicard,
    tof_db_run,
    tof_db_localtriggerboard,
    tof_db_mtbchannel,
    tof_db_paddle,
    tof_db_panel,
    tof_db_rat,
    tof_db_readoutboard,
);