feat: implement main application structure with UI and layout management
- Added main application logic in `src/ui/app.rs` to handle state and modal dialogs. - Created module structure for UI components in `src/ui/mod.rs`. - Implemented column configuration screen in `src/ui/screens/configuracao_colunas.rs`. - Developed file import screen in `src/ui/screens/import.rs` for CSV and XLSX files. - Added layout management screen in `src/ui/screens/layouts.rs` for saving and importing layouts. - Created result display screen in `src/ui/screens/resultado.rs` to show analysis results. - Introduced modular organization for screens in `src/ui/screens/mod.rs`.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
use chrono::NaiveDate;
|
||||
use rust_decimal::Decimal;
|
||||
|
||||
/// Representa uma nota fiscal com seus campos lógicos.
|
||||
/// `numero + serie` é o identificador único de cada nota.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Nota {
|
||||
/// Número incremental da nota. Armazenado como u64.
|
||||
pub numero: u64,
|
||||
/// Série da nota (1–3 dígitos numéricos). Ex: "001", "1".
|
||||
pub serie: String,
|
||||
/// Valor monetário da nota (opcional).
|
||||
pub valor: Option<Decimal>,
|
||||
/// Data de emissão da nota (opcional, exibida no PDF mas não usada em regras).
|
||||
pub data: Option<NaiveDate>,
|
||||
}
|
||||
|
||||
impl Nota {
|
||||
pub fn new(
|
||||
numero: u64,
|
||||
serie: String,
|
||||
valor: Option<Decimal>,
|
||||
data: Option<NaiveDate>,
|
||||
) -> Self {
|
||||
Self {
|
||||
numero,
|
||||
serie,
|
||||
valor,
|
||||
data,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user