Skip to content

Data Definition Document: Finance Reconciliation

Domain: Finance (Ledger, Budget, AP, AR) Logical Sub-Domain: Compliance (Audit & Matching) Physical Packages: @sd/mod-finance/compliance Related Documents: Process Blueprint Context: This document defines the Data Structures for Bank Auditing. Source: packages/modules/finance/src/compliance/reconciliation.ts

0. Entity Relationship Diagram (ERD)

erDiagram
    BANK_STATEMENT ||--o{ BANK_TRANSACTION : "contains"
    BANK_TRANSACTION |o--o| JOURNAL_ENTRY : "matches"

    BANK_STATEMENT {
        string id PK
        string fileName
        float closingBalance
        enum status "uploaded, parsed, reconciled"
    }

    BANK_TRANSACTION {
        string id PK
        date date
        string description
        float amount
        enum matchStatus "unmatched, matched"
    }

1. Primary Entities

Entity: BankStatement

A digital twin of the PDF.

Field Type Required Description
id string Yes Unique ID.
metadata object Yes Accounts #, Opening/Closing Balances.
analysis object No AI Insights (Anomalies).
status string Yes uploaded, parsed, reconciled.

Entity: BankTransaction

A single line from the statement.

Field Type Required Description
statementId string Yes Parent File.
amount number Yes Positive (Dep) or Negative (With).
description string Yes Raw text.
matchStatus string Yes unmatched, potential, matched.
matchedLedgerId string No Link to GL Entry.

4. Changelog

Date Author Description Reference
2026-01-24 Antigravity Initial creation Implementation Plan