diff options
Diffstat (limited to 'internal/models/types.go')
| -rw-r--r-- | internal/models/types.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/internal/models/types.go b/internal/models/types.go index e3164de..8eda33b 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -28,6 +28,39 @@ type Task struct { RecurrenceWeekdays []int `json:"recurrence_weekdays,omitempty"` RecurrenceSeriesID string `json:"recurrence_series_id,omitempty"` NextOccurrenceOverride *time.Time `json:"next_occurrence_override,omitempty"` + + // Chain membership (doot-native tasks only). ChainID != "" is the + // indicator that a task belongs to a linear task chain. + ChainID string `json:"chain_id,omitempty"` + ChainPosition int `json:"chain_position,omitempty"` + ChainUnlocked bool `json:"chain_unlocked,omitempty"` + + // Maintenance bucket membership (doot-native tasks only). BucketID != "" + // is the indicator that a task is part of a bucket's pool. + BucketID string `json:"bucket_id,omitempty"` + BucketState string `json:"bucket_state,omitempty"` // "dormant" | "active" + BucketLastActiveAt *time.Time `json:"bucket_last_active_at,omitempty"` +} + +// Chain is a fixed, ordered sequence of native tasks with a WIP limit of +// exactly 1 -- only one task in the chain is ever unlocked/actionable. +type Chain struct { + ID string `json:"id"` + ProjectID string `json:"project_id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` +} + +// MaintenanceBucket is a finite pool of native tasks that get repeatedly +// activated/deactivated: every CycleDays, PickN dormant items are selected +// and flipped active with a computed due date. +type MaintenanceBucket struct { + ID string `json:"id"` + Name string `json:"name"` + CycleDays int `json:"cycle_days"` + PickN int `json:"pick_n"` + LastCycleAt *time.Time `json:"last_cycle_at,omitempty"` + CreatedAt time.Time `json:"created_at"` } // Project is a lightweight grouping for doot-native tasks. Exactly one |
