Skip to main content

datasynth_core/models/
legal_document.rs

1//! Legal document models for audit engagement support.
2//!
3//! Legal documents are produced and consumed during audit engagements,
4//! covering engagement letters, management representation letters,
5//! legal opinions, regulatory filings, and board resolutions.
6//! Referenced by 686 GAM procedures.
7
8use chrono::NaiveDate;
9use serde::{Deserialize, Serialize};
10use uuid::Uuid;
11
12/// A legal document associated with an audit engagement.
13///
14/// Examples include engagement letters (ISA 210), management
15/// representation letters (ISA 580), legal opinions, regulatory
16/// filings, and board resolutions.
17#[derive(Debug, Clone, Serialize, Deserialize)]
18pub struct LegalDocument {
19    /// Unique identifier for this document.
20    pub document_id: Uuid,
21    /// Document type classification.
22    ///
23    /// Common values: `engagement_letter`, `management_rep`,
24    /// `legal_opinion`, `regulatory_filing`, `board_resolution`.
25    pub document_type: String,
26    /// Entity code this document belongs to.
27    pub entity_code: String,
28    /// Date the document was issued or signed.
29    pub date: NaiveDate,
30    /// Human-readable title.
31    pub title: String,
32    /// Names or roles of signatories.
33    #[serde(default)]
34    pub signatories: Vec<String>,
35    /// Key contractual or regulatory terms.
36    #[serde(default)]
37    pub key_terms: Vec<String>,
38    /// Current lifecycle status.
39    ///
40    /// Common values: `draft`, `final`, `signed`, `expired`.
41    pub status: String,
42}