Back to Data Models
Transaction
AgreedUpdated 2024-04-10
A single financial event — a payment, transfer, or refund — pulled from the user's bank.
Open questions / notes
Pending discussion: should we store raw bank category alongside our AI category, or only keep our version?
Fields
10 fields defined
| Name | Type | Required | Unique | Description |
|---|---|---|---|---|
| id | uuid | Primary key | ||
| connectionId | uuid | — | FK → BankConnection this came from | |
| plaidTransactionId | string | Plaid's own ID — used to deduplicate syncs | ||
| amount | float | — | Positive = money in, negative = money out | |
| currency | string | — | ISO 4217 currency code e.g. 'EUR' | |
| description | string | — | Merchant name or bank reference text | |
| date | date | — | Date the transaction occurred | |
| category | string | optional | — | AI-assigned category e.g. 'Groceries' |
| categoryConfidence | float | optional | — | AI confidence 0–1 — shown to user if below 0.7 |
| userCategory | string | optional | — | Category set manually by the user — overrides AI |
Relationships
How this model connects to others
Transactionbelongs toBankConnection
Source bank connection
ER Diagram
Auto-generated from the fields and relationships above
Other Models
More models in this project