introducing video struct in models.rs
This commit is contained in:
parent
fc2d0492fa
commit
7a36f3f8af
2 changed files with 17 additions and 4 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue