# Data Model

This document summarizes the main entities for Loom prototype v0.1.

## Core entities

- Area
- Project
- Task
- Note
- Tag
- FinancialCategory
- FinancialEntry
- TimeEntry
- ActivityLog
- Settings

## Common fields

All entities should include, when applicable:

```json
{
  "id": "uuid",
  "createdAt": "ISO-8601 UTC",
  "updatedAt": "ISO-8601 UTC",
  "archived": false,
  "schemaVersion": 1
}
```

## Relationship overview

- One Area has many Projects.
- One Project has many Tasks.
- One Task can have many subtasks.
- Projects and Tasks can have many Notes.
- Projects and Tasks can have many Tags.
- Projects can have many FinancialEntries and TimeEntries.

## Financial rules

- Store money in cents (integer).
- Use `currency` as ISO code (example: BRL, USD).

## Time rules

- Prefer UTC timestamps.
- Convert to local timezone only in UI.

For complete details and diagrams, see architecture.md.
