From 2f12211aa7d34fb5d3103a620c3f5650d382a2ba Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Tue, 20 Dec 2022 20:30:59 +0100 Subject: [PATCH] style: reformat based on sea-orm-cli geneartor --- entity/src/candidate.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/entity/src/candidate.rs b/entity/src/candidate.rs index fdfbc46..8a1e76e 100644 --- a/entity/src/candidate.rs +++ b/entity/src/candidate.rs @@ -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 for Entity { - fn to() -> RelationDef { - Relation::Session.def() - } + #[sea_orm(has_many = "super::session::Entity")] + Session, } impl Related for Entity { @@ -48,4 +42,10 @@ impl Related for Entity { } } +impl Related for Entity { + fn to() -> RelationDef { + Relation::Session.def() + } +} + impl ActiveModelBehavior for ActiveModel {}