From 0baf1134ea2d415aa55079ff98476afd0acf5811 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 14 Jul 2026 20:11:31 +0000 Subject: feat(tasks): add recurrence columns and model fields for native tasks recurrence_series_id != "" is the real recurring indicator (IsRecurring predates this feature and is never set). Adds parseWeekdays/formatWeekdays for the comma-separated weekday-list column, and threads the five new columns through scanNativeTasks and all four existing SELECT queries. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VTUSAEKfsPc6WGDq45yPHD --- internal/models/types.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/models') diff --git a/internal/models/types.go b/internal/models/types.go index 6f8c405..f74d264 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -20,6 +20,15 @@ type Task struct { URL string `json:"url"` CreatedAt time.Time `json:"created_at"` IsRecurring bool `json:"is_recurring"` + + // Recurrence (doot-native tasks only). RecurrenceSeriesID != "" is the + // real "is this task recurring" indicator -- IsRecurring above predates + // this feature and is never set by it. + RecurrenceFreq string `json:"recurrence_freq,omitempty"` + RecurrenceInterval int `json:"recurrence_interval,omitempty"` + RecurrenceWeekdays []int `json:"recurrence_weekdays,omitempty"` + RecurrenceSeriesID string `json:"recurrence_series_id,omitempty"` + NextOccurrenceOverride *time.Time `json:"next_occurrence_override,omitempty"` } // Meal represents a meal from PlanToEat -- cgit v1.2.3