Can upload files

This commit is contained in:
2025-04-09 21:12:47 +02:00
parent 84e1c57dc9
commit 61a4ea62c6
24 changed files with 342 additions and 61 deletions

View File

@ -13,7 +13,7 @@ diesel::table! {
}
diesel::table! {
attachments (id) {
files (id) {
id -> Int4,
time_create -> Int8,
#[max_length = 150]
@ -21,6 +21,8 @@ diesel::table! {
#[max_length = 130]
sha512 -> Varchar,
file_size -> Int4,
#[max_length = 150]
file_name -> Varchar,
user_id -> Int4,
}
}
@ -28,7 +30,7 @@ diesel::table! {
diesel::table! {
inbox (id) {
id -> Int4,
attachment_id -> Int4,
file_id -> Int4,
user_id -> Int4,
account_id -> Nullable<Int4>,
time_create -> Int8,
@ -43,7 +45,7 @@ diesel::table! {
time -> Int8,
#[max_length = 200]
label -> Varchar,
attachment_id -> Nullable<Int4>,
file_id -> Nullable<Int4>,
amount -> Float4,
checked -> Bool,
time_create -> Int8,
@ -68,7 +70,7 @@ diesel::table! {
right_account -> Bool,
right_movement -> Bool,
right_inbox -> Bool,
right_attachment -> Bool,
right_file -> Bool,
right_auth -> Bool,
}
}
@ -86,19 +88,12 @@ diesel::table! {
}
diesel::joinable!(accounts -> users (user_id));
diesel::joinable!(attachments -> users (user_id));
diesel::joinable!(files -> users (user_id));
diesel::joinable!(inbox -> accounts (account_id));
diesel::joinable!(inbox -> attachments (attachment_id));
diesel::joinable!(inbox -> files (file_id));
diesel::joinable!(inbox -> users (user_id));
diesel::joinable!(movements -> accounts (account_id));
diesel::joinable!(movements -> attachments (attachment_id));
diesel::joinable!(movements -> files (file_id));
diesel::joinable!(tokens -> users (user_id));
diesel::allow_tables_to_appear_in_same_query!(
accounts,
attachments,
inbox,
movements,
tokens,
users,
);
diesel::allow_tables_to_appear_in_same_query!(accounts, files, inbox, movements, tokens, users,);