This commit is contained in:
quantulr
2023-11-14 11:15:49 +08:00
parent bd1bb4952a
commit e0fe8f6a09
7 changed files with 55 additions and 15 deletions

View File

@ -17,6 +17,15 @@ pub struct Model {
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
pub enum Relation {
#[sea_orm(has_many = "super::la_article::Entity")]
LaArticle
}
impl Related<super::la_article::Entity> for Entity {
fn to() -> RelationDef {
Relation::LaArticle.def()
}
}
impl ActiveModelBehavior for ActiveModel {}