Back to Data Models
BankConnection
ImplementedUpdated 2024-04-02
A live link between a user's account and one of their bank accounts via Plaid.
Open questions / notes
accessToken is encrypted at rest. status goes to 'expired' when Plaid token rotates — user must reconnect.
Fields
7 fields defined
| Name | Type | Required | Unique | Description |
|---|---|---|---|---|
| id | uuid | Primary key | ||
| userId | uuid | — | FK → User who connected this account | |
| institutionName | string | — | Human-readable bank name e.g. 'ING Bank' | |
| accessToken | string | Encrypted Plaid access token | ||
| status | enum activeexpiredrevoked | — | Connection health | |
| lastSyncedAt | datetime | optional | — | When transactions were last pulled |
| createdAt | datetime | — | When the user connected this bank |
Relationships
How this model connects to others
BankConnectionbelongs toUser
Owner of this bank connection
BankConnectionhas manyTransaction
Transactions pulled from this account
ER Diagram
Auto-generated from the fields and relationships above
Other Models
More models in this project