init rust db backend
This commit is contained in:
37
lootalot_db/src/schema.rs
Normal file
37
lootalot_db/src/schema.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
table! {
|
||||
items (id) {
|
||||
id -> Nullable<Integer>,
|
||||
name -> Text,
|
||||
base_price -> Integer,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
looted (id) {
|
||||
id -> Nullable<Integer>,
|
||||
player_id -> Integer,
|
||||
item_id -> Integer,
|
||||
acquired_date -> Nullable<Date>,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
players (id) {
|
||||
id -> Nullable<Integer>,
|
||||
name -> Text,
|
||||
debt -> Nullable<Integer>,
|
||||
cp -> Nullable<Integer>,
|
||||
sp -> Nullable<Integer>,
|
||||
gp -> Nullable<Integer>,
|
||||
pp -> Nullable<Integer>,
|
||||
}
|
||||
}
|
||||
|
||||
joinable!(looted -> items (item_id));
|
||||
joinable!(looted -> players (player_id));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
items,
|
||||
looted,
|
||||
players,
|
||||
);
|
||||
Reference in New Issue
Block a user