features_cli/
models.rs

1use std::collections::HashMap;
2
3use crate::coverage_parser::CoverageStats;
4
5#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6pub struct Change {
7    pub title: String,
8    pub author_name: String,
9    pub author_email: String,
10    pub description: String,
11    pub date: String,
12    pub hash: String,
13}
14
15#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
16pub struct Stats {
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub files_count: Option<usize>,
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub lines_count: Option<usize>,
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub todos_count: Option<usize>,
23    pub commits: HashMap<String, serde_json::Value>,
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub coverage: Option<CoverageStats>,
26}
27
28#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
29pub struct Feature {
30    pub name: String,
31    pub description: String,
32    pub owner: String,
33    #[serde(rename = "is_owner_inherited")]
34    pub is_owner_inherited: bool,
35    pub path: String,
36    pub features: Vec<Feature>,
37    pub meta: HashMap<String, serde_json::Value>,
38    pub changes: Vec<Change>,
39    pub decisions: Vec<String>,
40    #[serde(skip_serializing_if = "Option::is_none")]
41    pub stats: Option<Stats>,
42}