Can import ZIP

This commit is contained in:
2025-05-05 20:38:46 +02:00
parent f335b9d0c0
commit aac878a245
11 changed files with 193 additions and 17 deletions

View File

@ -28,7 +28,7 @@ impl Display for AccountType {
}
}
#[derive(Queryable, Debug, Clone, serde::Serialize)]
#[derive(Queryable, Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Account {
id: i32,
pub name: String,

View File

@ -2,10 +2,12 @@ use crate::models::users::UserID;
use crate::schema::*;
use diesel::prelude::*;
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
#[derive(
Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash, PartialOrd, Ord,
)]
pub struct FileID(pub i32);
#[derive(Queryable, Debug, serde::Serialize)]
#[derive(Queryable, Debug, serde::Serialize, serde::Deserialize)]
pub struct File {
id: i32,
pub time_create: i64,

View File

@ -7,7 +7,7 @@ use diesel::{Insertable, Queryable, QueryableByName};
pub struct MovementID(pub i32);
/// Single movement information
#[derive(Queryable, QueryableByName, Debug, Clone, serde::Serialize)]
#[derive(Queryable, QueryableByName, Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Movement {
/// The ID of the movement
id: i32,