summaryrefslogtreecommitdiff
path: root/internal/models
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models')
-rw-r--r--internal/models/atom.go24
-rw-r--r--internal/models/atom_test.go30
-rw-r--r--internal/models/types.go8
3 files changed, 0 insertions, 62 deletions
diff --git a/internal/models/atom.go b/internal/models/atom.go
index 3804de4..9c519ba 100644
--- a/internal/models/atom.go
+++ b/internal/models/atom.go
@@ -1,7 +1,6 @@
package models
import (
- "fmt"
"time"
"task-dashboard/internal/config"
@@ -13,16 +12,13 @@ const (
SourceTrello AtomSource = "trello"
SourceTodoist AtomSource = "todoist"
SourceMeal AtomSource = "plantoeat"
- SourceBug AtomSource = "bug"
)
type AtomType string
const (
TypeTask AtomType = "task"
- TypeNote AtomType = "note"
TypeMeal AtomType = "meal"
- TypeBug AtomType = "bug"
)
// Atom represents a unified unit of work or information
@@ -147,23 +143,3 @@ func MealToAtom(m Meal) Atom {
}
}
-// BugToAtom converts a Bug to an Atom
-func BugToAtom(b Bug) Atom {
- // Bugs get high priority (3) to encourage fixing
- priority := 3
-
- return Atom{
- ID: fmt.Sprintf("bug-%d", b.ID),
- Title: b.Description,
- Description: "Bug Report",
- Source: SourceBug,
- Type: TypeBug,
- URL: "",
- DueDate: nil, // Bugs don't have due dates
- CreatedAt: b.CreatedAt,
- Priority: priority,
- SourceIcon: "🐛",
- ColorClass: "border-red-700",
- Raw: b,
- }
-}
diff --git a/internal/models/atom_test.go b/internal/models/atom_test.go
index 537d232..3ed4774 100644
--- a/internal/models/atom_test.go
+++ b/internal/models/atom_test.go
@@ -123,36 +123,6 @@ func TestMealToAtom(t *testing.T) {
}
}
-func TestBugToAtom(t *testing.T) {
- now := time.Now()
- bug := Bug{
- ID: 42,
- Description: "Something is broken",
- CreatedAt: now,
- }
-
- atom := BugToAtom(bug)
-
- if atom.ID != "bug-42" {
- t.Errorf("Expected ID 'bug-42', got '%s'", atom.ID)
- }
- if atom.Title != "Something is broken" {
- t.Errorf("Expected title 'Something is broken', got '%s'", atom.Title)
- }
- if atom.Source != SourceBug {
- t.Errorf("Expected source Bug, got '%s'", atom.Source)
- }
- if atom.Type != TypeBug {
- t.Errorf("Expected type Bug, got '%s'", atom.Type)
- }
- if atom.Priority != 3 {
- t.Errorf("Expected high priority 3, got %d", atom.Priority)
- }
- if atom.SourceIcon != "🐛" {
- t.Error("Expected bug icon")
- }
-}
-
func TestAtom_ComputeUIFields(t *testing.T) {
// Test nil due date
t.Run("nil due date", func(t *testing.T) {
diff --git a/internal/models/types.go b/internal/models/types.go
index 8ec2095..194eca9 100644
--- a/internal/models/types.go
+++ b/internal/models/types.go
@@ -159,14 +159,6 @@ type TaskListInfo struct {
Name string `json:"name"`
}
-// Bug represents a bug report
-type Bug struct {
- ID int64 `json:"id"`
- Description string `json:"description"`
- CreatedAt time.Time `json:"created_at"`
- ResolvedAt *time.Time `json:"resolved_at,omitempty"`
-}
-
// CacheMetadata tracks when data was last fetched
type CacheMetadata struct {
Key string `json:"key"`