You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mediarepo/mediarepo-daemon/mediarepo-database/src/entities/sorting_preset.rs

28 lines
642 B
Rust

use sea_orm::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "sorting_presets")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl Related<super::sort_key::Entity> for Entity {
fn to() -> RelationDef {
super::sorting_preset_key::Relation::SortingKey.def()
}
fn via() -> Option<RelationDef> {
Some(
super::sorting_preset_key::Relation::SortingPreset
.def()
.rev(),
)
}
}
impl ActiveModelBehavior for ActiveModel {}