trying to add sea-orm as a way to create sql based models
This commit is contained in:
parent
43f8c92253
commit
db99525963
11 changed files with 2191 additions and 16 deletions
24
src/rust/entities/videos.rs
Normal file
24
src/rust/entities/videos.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "videos")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: i32,
|
||||
pub title: String,
|
||||
#[sea_orm(column_name = "filePath")]
|
||||
pub file_path: String,
|
||||
#[sea_orm(column_name = "startTime")]
|
||||
pub start_time: i32,
|
||||
#[sea_orm(column_name = "endTime")]
|
||||
pub end_time: i32,
|
||||
#[sea_orm(column_name = "loop")]
|
||||
pub looping: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
Loading…
Add table
Add a link
Reference in a new issue