pub struct GLAccount {Show 20 fields
pub account_number: String,
pub short_description: String,
pub long_description: String,
pub account_type: AccountType,
pub sub_type: AccountSubType,
pub account_class: String,
pub account_group: String,
pub is_control_account: bool,
pub is_suspense_account: bool,
pub parent_account: Option<String>,
pub hierarchy_level: u8,
pub normal_debit_balance: bool,
pub is_postable: bool,
pub is_blocked: bool,
pub allowed_doc_types: Vec<String>,
pub requires_cost_center: bool,
pub requires_profit_center: bool,
pub industry_weights: IndustryWeights,
pub typical_frequency: f64,
pub typical_amount_range: (f64, f64),
}Expand description
Individual GL account definition.
Represents a single account in the chart of accounts with all necessary metadata for realistic transaction generation.
Fields§
§account_number: StringAccount number (e.g., “100000”, “400100”)
short_description: StringShort description
long_description: StringLong description
account_type: AccountTypePrimary account type
sub_type: AccountSubTypeDetailed sub-type classification
account_class: StringAccount class code (first digit typically)
account_group: StringAccount group for reporting
is_control_account: boolIs this a control account (subledger summary)
is_suspense_account: boolIs this a suspense/clearing account
parent_account: Option<String>Parent account number (for hierarchies)
hierarchy_level: u8Account hierarchy level (1 = top level)
normal_debit_balance: boolNormal balance side (true = debit, false = credit)
is_postable: boolIs posting allowed directly to this account
is_blocked: boolIs this account blocked for posting
allowed_doc_types: Vec<String>Allowed document types for this account
requires_cost_center: boolRequired cost center assignment
requires_profit_center: boolRequired profit center assignment
industry_weights: IndustryWeightsIndustry sector relevance scores (0.0-1.0)
typical_frequency: f64Typical transaction frequency (transactions per month)
typical_amount_range: (f64, f64)Typical transaction amount range (min, max)
Implementations§
Source§impl GLAccount
impl GLAccount
Sourcepub fn new(
account_number: String,
description: String,
account_type: AccountType,
sub_type: AccountSubType,
) -> Self
pub fn new( account_number: String, description: String, account_type: AccountType, sub_type: AccountSubType, ) -> Self
Create a new GL account with minimal required fields.
Sourcepub fn account_code(&self) -> &str
pub fn account_code(&self) -> &str
Get account code (alias for account_number).
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get description (alias for short_description).