mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-04 02:20:50 +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)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
#[sea_orm(has_many = "super::session::Entity")]
|
|
||||||
Session,
|
|
||||||
#[sea_orm(has_many = "super::parent::Entity")]
|
#[sea_orm(has_many = "super::parent::Entity")]
|
||||||
Parent,
|
Parent,
|
||||||
}
|
#[sea_orm(has_many = "super::session::Entity")]
|
||||||
|
Session,
|
||||||
impl Related<super::session::Entity> for Entity {
|
|
||||||
fn to() -> RelationDef {
|
|
||||||
Relation::Session.def()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Related<super::parent::Entity> for Entity {
|
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 {}
|
impl ActiveModelBehavior for ActiveModel {}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue