Files
checky/template.go

29 lines
445 B
Go
Raw Normal View History

2022-03-15 04:43:03 +00:00
package main
2022-03-16 00:03:27 +00:00
import "time"
2022-03-15 04:43:03 +00:00
type Template struct {
2022-03-16 00:03:27 +00:00
Id string `json:"id"`
Items []*Item `json:"items"`
}
type Item struct {
Id string `json:"id"`
Check *Check `json:"check,omitempty"`
}
type Check struct {
Text string `json:"text"`
Owner string `json:"owner"`
Completed *time.Time `json:"completed"`
2022-03-15 04:43:03 +00:00
}
func (t *Template) GetType() string {
2022-03-15 16:27:52 +00:00
return "template"
2022-03-15 04:43:03 +00:00
}
func (t *Template) GetId() string {
2022-03-15 16:27:52 +00:00
return t.Id
2022-03-15 04:43:03 +00:00
}