mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-16 21:11:06 +00:00
style: reformat based on sea-orm-cli geneartor
This commit is contained in:
parent
11092a41a5
commit
2f12211aa7
1 changed files with 8 additions and 8 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue