use sea_orm::entity::prelude::*; | |
use serde::{Deserialize, Serialize}; | |
pub struct Model { | |
pub kb_id: i64, | |
pub uid: i64, | |
pub kn_name: String, | |
pub icon: i64, | |
pub created_at: Date, | |
pub updated_at: Date, | |
} | |
pub enum Relation {} | |
impl Related<super::doc_info::Entity> for Entity { | |
fn to() -> RelationDef { | |
super::kb2_doc::Relation::DocInfo.def() | |
} | |
fn via() -> Option<RelationDef> { | |
Some(super::kb2_doc::Relation::KbInfo.def().rev()) | |
} | |
} | |
impl Related<super::dialog_info::Entity> for Entity { | |
fn to() -> RelationDef { | |
super::dialog2_kb::Relation::DialogInfo.def() | |
} | |
fn via() -> Option<RelationDef> { | |
Some(super::dialog2_kb::Relation::KbInfo.def().rev()) | |
} | |
} | |
impl ActiveModelBehavior for ActiveModel {} |