From 54e2f162c03ff7c732751ef35c266093c842c7bc Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 15 Jul 2026 18:06:03 +0000 Subject: 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. --- internal/models/types.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'internal/models') 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 { -- cgit v1.2.3