owl-blogs/entry_types/note.go

29 lines
482 B
Go
Raw Normal View History

2023-07-16 19:48:39 +00:00
package entrytypes
import "owl-blogs/domain/model"
2023-07-09 19:04:59 +00:00
type Note struct {
2023-07-16 19:48:39 +00:00
model.EntryBase
2023-07-09 19:04:59 +00:00
meta NoteMetaData
}
type NoteMetaData struct {
Content string `owl:"inputType=text widget=textarea"`
}
func (e *Note) Title() string {
return ""
}
2023-07-16 19:48:39 +00:00
func (e *Note) Content() model.EntryContent {
return model.EntryContent(e.meta.Content)
2023-07-09 19:04:59 +00:00
}
func (e *Note) MetaData() interface{} {
return &e.meta
}
func (e *Note) SetMetaData(metaData interface{}) {
e.meta = *metaData.(*NoteMetaData)
}