sfrs/src/schema.rs
Peter Cai 4be4de241f
try to implement items/sync
* we need to figure out a way to test this API
2020-02-21 14:40:41 +08:00

32 lines
656 B
Rust

table! {
items (id) {
id -> BigInt, // Forced, diesel does not support intepreting Integer as i64
owner -> Integer,
uuid -> Text,
content -> Nullable<Text>,
content_type -> Text,
enc_item_key -> Nullable<Text>,
deleted -> Bool,
created_at -> Timestamp,
updated_at -> Nullable<Timestamp>,
}
}
table! {
users (id) {
id -> Integer,
email -> Text,
password -> Text,
pw_cost -> Text,
pw_nonce -> Text,
version -> Text,
}
}
joinable!(items -> users (owner));
allow_tables_to_appear_in_same_query!(
items,
users,
);