summaryrefslogtreecommitdiff
path: root/internal/models/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models/types.go')
-rw-r--r--internal/models/types.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/models/types.go b/internal/models/types.go
index aa65e18..846ce50 100644
--- a/internal/models/types.go
+++ b/internal/models/types.go
@@ -51,6 +51,17 @@ type Chain struct {
CreatedAt time.Time `json:"created_at"`
}
+// ChainSummary is a chain plus enough denormalized context (project name,
+// the currently-unlocked task, position/total) to render a single Tasks-tab
+// card without the template needing its own store access.
+type ChainSummary struct {
+ Chain Chain
+ ProjectName string
+ CurrentTask *Task // nil if the chain has no unlocked task right now
+ Position int // 1-indexed
+ Total int
+}
+
// ChainTaskInput seeds one position of a chain at creation time. Priority
// of 0 (the zero value, JSON field omitted) defaults to 1, matching
// CreateNativeTask's default.