summaryrefslogtreecommitdiff
path: root/model.go
diff options
context:
space:
mode:
authorJulian Jørgensen <julian@jtle.dk>2024-05-25 11:53:43 +0200
committerJulian Jørgensen <julian@jtle.dk>2024-05-25 11:53:43 +0200
commit2610f9b67e4a915859c029da9b17e9d262b6564e (patch)
tree4504bf2d995703f583fff199b1ae7e54eef4e432 /model.go
parent6cdd02af0684500b5376d4d4a08feb796fdaf889 (diff)
Add task ui and editingold
Diffstat (limited to 'model.go')
-rw-r--r--model.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/model.go b/model.go
index b8d174c..93a988c 100644
--- a/model.go
+++ b/model.go
@@ -17,10 +17,10 @@ type Entry struct {
}
type Task struct {
- Id int
- Group *string
- Ident *string
- Text string
+ Id int
+ Group *string
+ Ident *string
+ Text string
}
type Date string
@@ -47,6 +47,15 @@ func NewEntry(date Date) *Entry {
}
+func NewTask() *Task {
+ return &Task{
+ Id: -1,
+ Group: nil,
+ Ident: nil,
+ Text: "",
+ }
+}
+
func TimeFromStd(time time.Time) Time {
return Time(time.Format("15:04"))
}