19 lines
309 B
Rust
19 lines
309 B
Rust
|
use super::schema::files;
|
||
|
|
||
|
#[derive(Queryable)]
|
||
|
pub struct File {
|
||
|
pub id: i32,
|
||
|
pub hash: String,
|
||
|
pub path: String,
|
||
|
pub size: i64,
|
||
|
pub valid: bool,
|
||
|
}
|
||
|
|
||
|
#[derive(Insertable, Debug)]
|
||
|
#[table_name = "files"]
|
||
|
pub struct NewFile {
|
||
|
pub hash: String,
|
||
|
pub path: String,
|
||
|
pub size: i64,
|
||
|
}
|