Skip to content

Models

domain.expense.models

Summary

Define the Expense aggregate model (entity, account, tags, and amount) shared across layers.

Classes

Expense

Bases: BaseModel

Expense transaction linking an entity, account, and tags.

Attributes:

Name Type Description
entity Entity

Payee entity the expense was incurred with.

amount float

Transaction amount.

account Account

Account the expense was paid from.

tags List[Tag]

Tags classified against the expense.

occurred_at str

Date the expense occurred, as DD-MM-YYYY.

fetch_request Optional[str]

ID of the fetch request that produced the expense; None when not sourced from a request.