introducing video struct in models.rs

This commit is contained in:
Chris Cochrun 2023-04-06 06:06:09 -05:00
parent fc2d0492fa
commit 7a36f3f8af
2 changed files with 17 additions and 4 deletions

View file

@ -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,
}

View file

@ -40,11 +40,14 @@ diesel::table! {
videos (id) {
id -> Integer,
title -> Text,
filePath -> Text,
startTime -> Nullable<Float>,
endTime -> Nullable<Float>,
#[sql_name = "filePath"]
path -> Text,
#[sql_name = "filePath"]
start_time -> Nullable<Float>,
#[sql_name = "filePath"]
end_time -> Nullable<Float>,
#[sql_name = "loop"]
loop_ -> Bool,
looping -> Bool,
}
}