blog/internal/model/blog_text_content.go

20 lines
480 B
Go

package model
import "encoding/json"
type BlogTextContent struct {
Id string `json:"id" gorm:"primary_key"`
RelId string `json:"relId" gorm:"rel_id"`
Content string `json:"content"`
State string `json:"state"`
}
func (article *BlogTextContent) MarshalBinary() (data []byte, err error) {
// encoding.BinaryMarshaler
return json.Marshal(article)
}
func (article *BlogTextContent) UnmarshalBinary(data []byte) (err error) {
return json.Unmarshal(data, article)
}