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
use crate::users::schema::users;
table! {
chemical (id) {
id -> Unsigned<Bigint>,
name -> Varchar,
purpose -> Varchar,
company_name -> Varchar,
ingredients -> Varchar,
manual_link -> Varchar,
}
}
table! {
chemical_inventory (id) {
id -> Unsigned<Bigint>,
purchaser_id -> Unsigned<Bigint>,
custodian_id -> Unsigned<Bigint>,
chemical_id -> Unsigned<Bigint>,
storage_location -> Varchar,
amount -> Varchar,
}
}
joinable!(chemical_inventory -> chemical (chemical_id));
allow_tables_to_appear_in_same_query!(chemical, chemical_inventory, users,);