# CostLayerConsumption

## Description

CostLayerConsumption records which issue consumed how much of which layer: one row per slice a costed issue consumed from a [CostLayer](./CostLayer.md), carrying the layer, the OUT ledger entry, and the consumed quantity. Consumptions carry no money.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- Consumptions are written internally by [postInventoryLedger](../command/PostInventoryLedger.md) when a costed issue consumes layers; no direct command

### Query Definitions

- Consumptions are resolved internally by costing; no read query yet

### Models

- CostLayerConsumption

### Invariants

- Consumed quantity is greater than zero and never exceeds the layer's remaining quantity at consumption time
- Rows are append-only; the sum of consumed quantities per layer equals the layer's received quantity minus its remaining quantity

### Relationships

- **References CostLayer**: Each consumption consumes exactly one cost layer
- **References InventoryLedger**: Each consumption traces back to the OUT ledger entry that consumed the stock
