Application data model
Table: applications
Key fields
| Field | Type | Notes |
|---|---|---|
| id | bigint | Primary key |
| user_id | foreign key | Owner |
| position_id | foreign key | Related position |
| status | string (enum) | Application lifecycle state |
| applied_at | datetime | Submission timestamp |
| notes | text | User contextual notes |
| created_at | timestamp | |
| updated_at | timestamp | |
| deleted_at | timestamp | Soft delete |
Relationships
- belongs to
User - belongs to
Position - has many
Documents(through pivot table)
Constraints
- Foreign keys enforced
- Soft deletes enabled
- Status values constrained by enum