mi/backend/src/schema.rs

34 lines
546 B
Rust
Raw Normal View History

2020-09-13 16:07:06 +00:00
table! {
members (id) {
2020-09-13 16:55:29 +00:00
id -> Integer,
2020-09-13 16:07:06 +00:00
cmene -> Text,
picurl -> Text,
}
}
table! {
switches (id) {
id -> Text,
2020-11-02 18:06:50 +00:00
member_id -> Integer,
started_at -> Timestamp,
ended_at -> Nullable<Timestamp>,
duration -> Integer,
2020-09-13 16:07:06 +00:00
}
}
2020-11-02 18:06:50 +00:00
table! {
webmentions (id) {
id -> Text,
source_url -> Text,
target_url -> Text,
}
}
joinable!(switches -> members (member_id));
2020-09-13 16:07:06 +00:00
allow_tables_to_appear_in_same_query!(
members,
switches,
2020-11-02 18:06:50 +00:00
webmentions,
2020-09-13 16:07:06 +00:00
);