owl-blogs/domain/model/image_entry.go

24 lines
461 B
Go
Raw Normal View History

2023-06-25 18:04:06 +00:00
package model
type ImageEntry struct {
2023-07-08 13:56:42 +00:00
EntryBase
meta ImageEntryMetaData
2023-06-25 18:04:06 +00:00
}
type ImageEntryMetaData struct {
2023-07-08 09:08:55 +00:00
ImageId string `owl:"inputType=file"`
Content string `owl:"inputType=text widget=textarea"`
2023-06-25 18:04:06 +00:00
}
func (e *ImageEntry) Content() EntryContent {
2023-07-07 19:04:25 +00:00
return EntryContent(e.meta.Content)
2023-06-25 18:04:06 +00:00
}
func (e *ImageEntry) MetaData() interface{} {
2023-07-07 19:04:25 +00:00
return &e.meta
2023-06-25 18:04:06 +00:00
}
2023-07-08 13:56:42 +00:00
func (e *ImageEntry) SetMetaData(metaData interface{}) {
2023-07-06 16:56:43 +00:00
e.meta = *metaData.(*ImageEntryMetaData)
2023-06-25 18:04:06 +00:00
}