diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-15 18:06:03 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 02:54:17 +0000 |
| commit | 54e2f162c03ff7c732751ef35c266093c842c7bc (patch) | |
| tree | 88cc75b54c9e3e950e7755f7bf72cba3d7f5348f /internal/models/types.go | |
| parent | 194c1aa3ff6adc086dad8b2257c29b6e1c374977 (diff) | |
feat(tasks): add projects/labels schema, wire project_id through native tasks
project_id joins the existing labels JSON column as series-level
metadata: CreateNextIteration copies both onto every new recurring
occurrence, matching content/description/priority's existing behavior.
Diffstat (limited to 'internal/models/types.go')
| -rw-r--r-- | internal/models/types.go | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/internal/models/types.go b/internal/models/types.go index fdde455..4a923a8 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -29,6 +29,23 @@ type Task struct { NextOccurrenceOverride *time.Time `json:"next_occurrence_override,omitempty"` } +// Project is a lightweight grouping for doot-native tasks. Exactly one +// project per task (Task.ProjectID); labels handle cross-cutting tagging. +type Project struct { + ID string `json:"id"` + Name string `json:"name"` + Color string `json:"color"` + CreatedAt time.Time `json:"created_at"` + Archived bool `json:"archived"` +} + +// LabelColor maps a label's free-text name to its display color. A label +// with no matching row here just has no color assigned yet. +type LabelColor struct { + Name string `json:"name"` + Color string `json:"color"` +} + // Meal represents a meal from PlanToEat type Meal struct { ID string `json:"id"` @@ -126,11 +143,6 @@ type Card struct { URL string `json:"url"` } -// Project represents a project (used for source config grouping) -type Project struct { - ID string `json:"id"` - Name string `json:"name"` -} // CalendarEvent represents a Google Calendar event type CalendarEvent struct { |
