Files
lootalot/lootalot_db/src/schema.rs
2020-01-09 13:25:36 +01:00

70 lines
1.2 KiB
Rust

table! {
claims (id) {
id -> Integer,
player_id -> Integer,
loot_id -> Integer,
resolve -> Integer,
}
}
table! {
history (id) {
id -> Integer,
player_id -> Integer,
event_date -> Timestamp,
text -> Text,
updates -> Nullable<Text>,
}
}
table! {
items (id) {
id -> Integer,
name -> Text,
base_price -> Integer,
}
}
table! {
loot (id) {
id -> Integer,
name -> Text,
base_price -> Integer,
owner_id -> Integer,
}
}
table! {
notifications (id) {
id -> Integer,
player_id -> Integer,
text -> Text,
}
}
table! {
players (id) {
id -> Integer,
name -> Text,
debt -> Integer,
cp -> Integer,
sp -> Integer,
gp -> Integer,
pp -> Integer,
}
}
joinable!(claims -> players (player_id));
joinable!(history -> players (player_id));
joinable!(loot -> players (owner_id));
joinable!(notifications -> players (player_id));
allow_tables_to_appear_in_same_query!(
claims,
history,
items,
loot,
notifications,
players,
);