//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "ticks")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub track_id: Option, pub year: Option, pub month: Option, pub day: Option, pub hour: Option, pub minute: Option, pub second: Option, pub has_time_info: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "super::tracks::Entity", from = "Column::TrackId", to = "super::tracks::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Tracks, } impl Related for Entity { fn to() -> RelationDef { Relation::Tracks.def() } } impl ActiveModelBehavior for ActiveModel {}