use chrono::NaiveDateTime; use serde::Serialize; use super::schema::{data, files}; #[derive(Queryable, Serialize, Debug)] pub struct File { pub id: i32, pub hash: Vec, pub path: String, pub size: i64, pub created: NaiveDateTime, pub valid: bool, } #[derive(Insertable, Debug)] #[table_name = "files"] pub struct NewFile { pub hash: Vec, pub path: String, pub size: i64, pub created: NaiveDateTime, } #[derive(Queryable, Insertable, Serialize, Debug)] #[table_name = "data"] pub struct Entry { pub identity: Vec, pub target: Vec, pub key: String, pub value: String, }