Files
checky/template.go
2022-03-17 04:08:08 +00:00

39 lines
573 B
Go

package main
import "time"
type Template struct {
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"`
}
func NewTemplate() *Template {
return &Template{
Items: []*Item{},
}
}
func (t *Template) GetType() string {
return "template"
}
func (t *Template) GetId() string {
return t.Id
}
func (t *Template) IsValid() bool {
return true
}