# AccountingEvent

## Description

AccountingEvent is an immutable accounting event emitted by a source module. It
captures the event kind, payload schema version, timing, company scope, and a
resolver-neutral JSON payload snapshot. It does not represent a journal entry and
does not decide whether the event will resolve to an internal Tailor document or an
external accounting API payload.

## Domain Model Definitions

### Model type

AppendOnly

### Command Definitions

- PostAccountingEvent

### Query Definitions

- None

### Models

- AccountingEvent

### Invariants

- Accounting events are append-only intent snapshots
- eventKind and schemaVersion are top-level routing and parsing keys
- Source document references, currency, amount, and event-specific facts belong inside payloadJson
- Source correction is represented by a new source-module event, not by overriding an existing event
- The module does not store destination, output type, or adapter-specific routing decisions
- payloadJson content is handler-owned and must be treated as an immutable snapshot by handlers
- AccountingEvent does not have a processing status

### Relationships

- **References Company**: Each accounting event is scoped to a Company via companyId
