# BankStatement

## Description

BankStatement is an imported statement header for one BankAccount. Its opening balance plus CREDIT movements minus DEBIT movements must equal its closing balance.

## Domain Model Definitions

### Model type

AppendOnly

### Command Definitions

- [createBankStatement](../command/CreateBankStatement.md) - Import one statement and all lines atomically

### Query Definitions

- None

### Models

- BankStatement
- BankStatementLine

### Invariants

- Statement number is unique within a BankAccount
- At least one line is required
- Line numbers are positive and unique within a statement
- Line amounts are positive; flowDirection supplies the sign
- Opening balance plus signed line movements equals closing balance

### Relationships

- Belongs to BankAccount
- Has many BankStatementLines
