Position data model
Table: positions
Key fields
| Field | Type | Notes |
|---|---|---|
| id | bigint | Primary key |
| user_id | foreign key | Owner |
| title | string | Job title (structural) |
| company | string | Company name (structural) |
| location | string (nullable) | Contextual information |
| source_url | string (nullable) | External job link |
| description | text (nullable) | Job description snapshot |
| notes | text (nullable) | Contextual notes |
| created_at | timestamp | |
| updated_at | timestamp | |
| deleted_at | timestamp | Soft delete |
Relationships
- belongs to
User - has many
Applications
Design considerations
- Structural fields (
title,company,description) are frozen after application submission. - Contextual fields (
location,notes) may evolve over time. - Ownership is enforced at the database and policy level.
Soft deletes ensure historical consistency.