Class FinancialStatement
java.lang.Object
com.raphaelsalles.backend.domain.model.FinancialStatement
Representa um Demonstrativo Financeiro (Balanço Patrimonial, DRE) de um período específico.
Papel na Arquitetura: É a unidade fundamental de dados contábeis. Armazena tanto os valores sumarizados (Receita, Lucro) para acesso rápido quanto o detalhamento completo das contas (AccountLines) para auditoria.
Responsabilidades Principais:- Armazenar a "foto" financeira da empresa em uma data (ReferenceDate).
- Diferenciar tipos de demonstrativo (DFP Anual vs ITR Trimestral).
- Servir de cache de performance para indicadores chave (Revenue, NetIncome, Equity).
- Manter a rastreabilidade da importação (ImportedBy, ImportedAt).
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<AccountLine> private Companyprivate BigDecimalprivate Longprivate LocalDateTimeprivate Userprivate BigDecimalprivate LocalDateprivate BigDecimalprivate StatementType -
Constructor Summary
ConstructorsConstructorDescriptionFinancialStatement(Long id, Company company, LocalDate referenceDate, StatementType type, BigDecimal revenue, BigDecimal netIncome, BigDecimal equity, LocalDateTime importedAt, User importedBy, List<AccountLine> accounts) -
Method Summary
Modifier and TypeMethodDescriptionprivate static List<AccountLine> voidaddAccountLine(AccountLine line) builder()getId()getType()voidsetCompany(Company company) voidsetEquity(BigDecimal equity) voidsetImportedAt(LocalDateTime importedAt) voidsetImportedBy(User importedBy) voidsetNetIncome(BigDecimal netIncome) voidsetReferenceDate(LocalDate referenceDate) voidsetRevenue(BigDecimal revenue) voidsetType(StatementType type)
-
Field Details
-
id
-
company
-
referenceDate
-
type
-
revenue
-
netIncome
-
equity
-
importedAt
-
importedBy
-
accounts
-
-
Constructor Details
-
FinancialStatement
public FinancialStatement() -
FinancialStatement
public FinancialStatement(Long id, Company company, LocalDate referenceDate, StatementType type, BigDecimal revenue, BigDecimal netIncome, BigDecimal equity, LocalDateTime importedAt, User importedBy, List<AccountLine> accounts)
-
-
Method Details
-
addAccountLine
-
$default$accounts
-
builder
-
getId
-
getCompany
-
getReferenceDate
-
getType
-
getRevenue
-
getNetIncome
-
getEquity
-
getImportedAt
-
getImportedBy
-
getAccounts
-
setCompany
-
setReferenceDate
-
setType
-
setRevenue
-
setNetIncome
-
setEquity
-
setImportedAt
-
setImportedBy
-