This commit is contained in:
2022-10-22 16:46:45 +05:30
parent 44f9a8b15f
commit 2143923ee8
20 changed files with 409 additions and 229 deletions

View File

@@ -1,4 +1,4 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
use sea_orm::entity::prelude::*;
@@ -33,6 +33,8 @@ pub enum Relation {
BookSubject,
#[sea_orm(has_many = "super::book_time::Entity")]
BookTime,
#[sea_orm(has_many = "super::book_isbn::Entity")]
BookIsbn,
}
impl Related<super::book_author::Entity> for Entity {
@@ -65,4 +67,10 @@ impl Related<super::book_time::Entity> for Entity {
}
}
impl Related<super::book_isbn::Entity> for Entity {
fn to() -> RelationDef {
Relation::BookIsbn.def()
}
}
impl ActiveModelBehavior for ActiveModel {}