26 lines
693 B
Go
26 lines
693 B
Go
package admin
|
|
|
|
import "encoding/json"
|
|
|
|
type AdminDiary struct {
|
|
Id string `json:"id" gorm:"primary_key"`
|
|
Images string `json:"images"`
|
|
PublishTime int64 `json:"publishTime"`
|
|
CreateBy string `json:"createBy"`
|
|
CreateTime int64 `json:"createTime"`
|
|
UpdateBy string `json:"updateBy"`
|
|
UpdateTime int64 `json:"updateTime"`
|
|
State string `json:"state"`
|
|
Del int `json:"del"`
|
|
// Content string `json:"content"`
|
|
}
|
|
|
|
func (diary *AdminDiary) MarshalBinary() (data []byte, err error) {
|
|
// encoding.BinaryMarshaler
|
|
return json.Marshal(diary)
|
|
}
|
|
|
|
func (diary *AdminDiary) UnmarshalBinary(data []byte) (err error) {
|
|
return json.Unmarshal(data, diary)
|
|
}
|