add contract md folder support
This commit is contained in:
@@ -136,6 +136,14 @@ impl ContractRevision {
|
||||
}
|
||||
}
|
||||
|
||||
/// Table of Contents item for multi-page contracts
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TocItem {
|
||||
pub title: String,
|
||||
pub file: String,
|
||||
pub children: Vec<TocItem>,
|
||||
}
|
||||
|
||||
/// Contract model
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Contract {
|
||||
@@ -153,6 +161,9 @@ pub struct Contract {
|
||||
pub revisions: Vec<ContractRevision>,
|
||||
pub current_version: u32,
|
||||
pub organization_id: Option<String>,
|
||||
// Multi-page markdown support
|
||||
pub content_dir: Option<String>,
|
||||
pub toc: Option<Vec<TocItem>>,
|
||||
}
|
||||
|
||||
impl Contract {
|
||||
@@ -171,8 +182,10 @@ impl Contract {
|
||||
expiration_date: None,
|
||||
signers: Vec::new(),
|
||||
revisions: Vec::new(),
|
||||
current_version: 0,
|
||||
current_version: 1,
|
||||
organization_id,
|
||||
content_dir: None,
|
||||
toc: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user