aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/todo_item.go
diff options
context:
space:
mode:
authorGrant Ammons <gammons@gmail.com>2016-04-24 10:22:33 -0400
committerGrant Ammons <gammons@gmail.com>2016-04-24 10:22:33 -0400
commit63893587cb41a1980318b60bf05fafbf433a24ab (patch)
tree39c93f3a1735ef33d028ab9ef44fc0ac15049208 /todolist/todo_item.go
parent6bb90375f4efb2f390a61ede0df70eea1ef1f50f (diff)
Organize things a bit better
Diffstat (limited to 'todolist/todo_item.go')
-rw-r--r--todolist/todo_item.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/todolist/todo_item.go b/todolist/todo_item.go
new file mode 100644
index 0000000..1319132
--- /dev/null
+++ b/todolist/todo_item.go
@@ -0,0 +1,22 @@
+package todolist
+
+import "time"
+
+type Todo struct {
+ Id int
+ Subject string
+ Projects []string
+ Contexts []string
+ Due string
+ FormattedDue time.Time
+ Completed bool
+ Archived bool
+}
+
+func NewTodo() *Todo {
+ return &Todo{Completed: false, Archived: false}
+}
+
+func (t Todo) Valid() bool {
+ return (t.Subject != "")
+}