Skip to content

Commit

Permalink
feat: align datastructure format
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Aug 16, 2023
1 parent bc4cb94 commit 79001af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions counit-server/src/model/archguard_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,18 @@ pub struct CodeDatabaseRelation {
tables: Vec<String>,
#[serde(default)]
sqls: Vec<String>,
#[serde(default)]
implementations: Vec<String>,
#[serde(default)]
relations: Vec<NodeRelation>
}

impl std::fmt::Display for CodeDatabaseRelation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}.{}.{}", self.package_name, self.class_name, self.function_name)
}
}

#[derive(Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NodeRelation {
Expand Down

0 comments on commit 79001af

Please sign in to comment.