26 lines
627 B
Go
26 lines
627 B
Go
package vo
|
|
|
|
import "encoding/json"
|
|
|
|
type CommonFiles struct {
|
|
Id string `json:"id" gorm:"primary_key"`
|
|
FileName string `json:"fileName"`
|
|
Data []byte `json:"-"`
|
|
Sort int32 `json:"sort"`
|
|
CreateBy string `json:"-"`
|
|
CreateTime int64 `json:"-"`
|
|
UpdateBy string `json:"-"`
|
|
UpdateTime int64 `json:"-"`
|
|
State string `json:"-"`
|
|
Del int `json:"-"`
|
|
}
|
|
|
|
func (file *CommonFiles) MarshalBinary() (data []byte, err error) {
|
|
// encoding.BinaryMarshaler
|
|
return json.Marshal(file)
|
|
}
|
|
|
|
func (file *CommonFiles) UnmarshalBinary(data []byte) (err error) {
|
|
return json.Unmarshal(data, file)
|
|
}
|