format code (#14)

This commit is contained in:
KevinHuSh
2023-12-25 10:17:13 +08:00
committed by GitHub
parent 8a65ad888e
commit 6858ec5f38
30 changed files with 1062 additions and 771 deletions

View File

@@ -1,5 +1,5 @@
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
use serde::{ Deserialize, Serialize };
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Deserialize, Serialize)]
#[sea_orm(table_name = "dialog2_kb")]
@@ -21,16 +21,18 @@ pub enum Relation {
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
match self {
Self::DialogInfo => Entity::belongs_to(super::dialog_info::Entity)
.from(Column::DialogId)
.to(super::dialog_info::Column::DialogId)
.into(),
Self::KbInfo => Entity::belongs_to(super::kb_info::Entity)
.from(Column::KbId)
.to(super::kb_info::Column::KbId)
.into(),
Self::DialogInfo =>
Entity::belongs_to(super::dialog_info::Entity)
.from(Column::DialogId)
.to(super::dialog_info::Column::DialogId)
.into(),
Self::KbInfo =>
Entity::belongs_to(super::kb_info::Entity)
.from(Column::KbId)
.to(super::kb_info::Column::KbId)
.into(),
}
}
}
impl ActiveModelBehavior for ActiveModel {}
impl ActiveModelBehavior for ActiveModel {}