style: reformat based on sea-orm-cli geneartor

This commit is contained in:
Sebastian Pravda 2022-12-20 20:30:59 +01:00
parent 11092a41a5
commit 2f12211aa7
No known key found for this signature in database
GPG key ID: F3BC84F08EFA3F57

View file

@ -30,16 +30,10 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::session::Entity")]
Session,
#[sea_orm(has_many = "super::parent::Entity")]
Parent,
}
impl Related<super::session::Entity> for Entity {
fn to() -> RelationDef {
Relation::Session.def()
}
#[sea_orm(has_many = "super::session::Entity")]
Session,
}
impl Related<super::parent::Entity> for Entity {
@ -48,4 +42,10 @@ impl Related<super::parent::Entity> for Entity {
}
}
impl Related<super::session::Entity> for Entity {
fn to() -> RelationDef {
Relation::Session.def()
}
}
impl ActiveModelBehavior for ActiveModel {}