impl tags api (#2)
This commit is contained in:
@@ -6,15 +6,13 @@ use serde::{Deserialize, Serialize};
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub kb_id: i64,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
#[sea_orm(index)]
|
||||
pub uid: i64,
|
||||
pub kn_name: String,
|
||||
pub icon: i64,
|
||||
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub updated_at: DateTimeWithTimeZone,
|
||||
#[sea_orm(soft_delete_column)]
|
||||
pub is_deleted: bool,
|
||||
pub created_at: Date,
|
||||
pub updated_at: Date,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
@@ -22,21 +20,21 @@ pub enum Relation {}
|
||||
|
||||
impl Related<super::doc_info::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
super::kb_2_doc::Relation::DocInfo.def()
|
||||
super::kb2_doc::Relation::DocInfo.def()
|
||||
}
|
||||
|
||||
fn via() -> Option<RelationDef> {
|
||||
Some(super::kb_2_doc::Relation::KbInfo.def().rev())
|
||||
Some(super::kb2_doc::Relation::KbInfo.def().rev())
|
||||
}
|
||||
}
|
||||
|
||||
impl Related<super::dialog_info::Entity> for Entity {
|
||||
fn to() -> RelationDef {
|
||||
super::dialog_2_kb::Relation::DialogInfo.def()
|
||||
super::dialog2_kb::Relation::DialogInfo.def()
|
||||
}
|
||||
|
||||
fn via() -> Option<RelationDef> {
|
||||
Some(super::dialog_2_kb::Relation::KbInfo.def().rev())
|
||||
Some(super::dialog2_kb::Relation::KbInfo.def().rev())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user