diff --git a/src/rust/models.rs b/src/rust/models.rs index 45e0ce7..5308068 100644 --- a/src/rust/models.rs +++ b/src/rust/models.rs @@ -6,3 +6,13 @@ pub struct Image { pub title: String, pub path: String, } + +#[derive(Queryable)] +pub struct Video { + pub id: i32, + pub title: String, + pub path: String, + pub start_time: f32, + pub end_time: f32, + pub looping: bool, +} diff --git a/src/rust/schema.rs b/src/rust/schema.rs index 96fcc85..de6257d 100644 --- a/src/rust/schema.rs +++ b/src/rust/schema.rs @@ -40,11 +40,14 @@ diesel::table! { videos (id) { id -> Integer, title -> Text, - filePath -> Text, - startTime -> Nullable, - endTime -> Nullable, + #[sql_name = "filePath"] + path -> Text, + #[sql_name = "filePath"] + start_time -> Nullable, + #[sql_name = "filePath"] + end_time -> Nullable, #[sql_name = "loop"] - loop_ -> Bool, + looping -> Bool, } }