pub struct JournalEntryHeader {Show 32 fields
pub document_id: Uuid,
pub company_code: String,
pub fiscal_year: u16,
pub fiscal_period: u8,
pub posting_date: NaiveDate,
pub document_date: NaiveDate,
pub created_at: DateTime<Utc>,
pub document_type: String,
pub currency: String,
pub exchange_rate: Decimal,
pub reference: Option<String>,
pub header_text: Option<String>,
pub created_by: String,
pub user_persona: String,
pub source: TransactionSource,
pub business_process: Option<BusinessProcess>,
pub ledger: String,
pub is_fraud: bool,
pub fraud_type: Option<FraudType>,
pub is_anomaly: bool,
pub anomaly_id: Option<String>,
pub anomaly_type: Option<String>,
pub batch_id: Option<Uuid>,
pub control_ids: Vec<String>,
pub sox_relevant: bool,
pub control_status: ControlStatus,
pub sod_violation: bool,
pub sod_conflict_type: Option<SodConflictType>,
pub approval_workflow: Option<ApprovalWorkflow>,
pub ocpm_event_ids: Vec<Uuid>,
pub ocpm_object_ids: Vec<Uuid>,
pub ocpm_case_id: Option<Uuid>,
}Expand description
Header information for a journal entry document.
Contains all metadata about the posting including timing, user, and organizational assignment.
Fields§
§document_id: UuidUnique identifier for this journal entry (UUID v7 for time-ordering)
company_code: StringCompany code this entry belongs to
fiscal_year: u16Fiscal year (4-digit)
fiscal_period: u8Fiscal period (1-12, or 13-16 for special periods)
posting_date: NaiveDatePosting date (when the entry affects the books)
document_date: NaiveDateDocument date (date on source document)
created_at: DateTime<Utc>Entry timestamp (when created in system)
document_type: StringDocument type code
currency: StringTransaction currency (ISO 4217)
exchange_rate: DecimalExchange rate to local currency (1.0 if same currency)
reference: Option<String>Reference document number (external reference)
header_text: Option<String>Header text/description
created_by: StringUser who created the entry
user_persona: StringUser persona classification for behavioral analysis
source: TransactionSourceTransaction source (manual vs automated)
business_process: Option<BusinessProcess>Business process reference
ledger: StringLedger (0L = Leading Ledger)
is_fraud: boolIs this entry part of a fraud scenario
fraud_type: Option<FraudType>Fraud type if applicable
is_anomaly: boolWhether this entry has an injected anomaly
anomaly_id: Option<String>Unique anomaly identifier for label linkage
anomaly_type: Option<String>Type of anomaly if applicable (serialized enum name)
batch_id: Option<Uuid>Simulation batch ID for traceability
control_ids: Vec<String>Internal control IDs that apply to this transaction
sox_relevant: boolWhether this is a SOX-relevant transaction
control_status: ControlStatusControl status for this transaction
sod_violation: boolWhether a Segregation of Duties violation occurred
sod_conflict_type: Option<SodConflictType>Type of SoD conflict if violation occurred
approval_workflow: Option<ApprovalWorkflow>Approval workflow for high-value transactions
ocpm_event_ids: Vec<Uuid>OCPM event IDs that triggered this journal entry
ocpm_object_ids: Vec<Uuid>OCPM object IDs involved in this journal entry
ocpm_case_id: Option<Uuid>OCPM case ID for process instance tracking
Implementations§
Source§impl JournalEntryHeader
impl JournalEntryHeader
Sourcepub fn new(company_code: String, posting_date: NaiveDate) -> Self
pub fn new(company_code: String, posting_date: NaiveDate) -> Self
Create a new journal entry header with default values.
Sourcepub fn with_deterministic_id(
company_code: String,
posting_date: NaiveDate,
document_id: Uuid,
) -> Self
pub fn with_deterministic_id( company_code: String, posting_date: NaiveDate, document_id: Uuid, ) -> Self
Create a new journal entry header with a deterministic document ID.
Used for reproducible generation where the document ID is derived from a seed and counter.
Trait Implementations§
Source§impl Clone for JournalEntryHeader
impl Clone for JournalEntryHeader
Source§fn clone(&self) -> JournalEntryHeader
fn clone(&self) -> JournalEntryHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more