|
|
@@ -1,5 +1,7 @@
|
|
|
package viewmodels
|
|
|
|
|
|
+import "encoding/json"
|
|
|
+
|
|
|
type ObjectDataInfo struct {
|
|
|
ModelId int64 `json:"modelId" xorm:"'model_id' bigint pk comment('主键ID') "`
|
|
|
ModelTitle string `json:"modelTitle" xorm:"'model_title' varchar(127) comment('Model Title')"`
|
|
|
@@ -15,3 +17,12 @@ type ObjectDataInfo struct {
|
|
|
func (t *ObjectDataInfo) TableName() string {
|
|
|
return "ds_object"
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+func (g *ObjectDataInfo) MarshalBinary() (data []byte, err error){
|
|
|
+ return json.Marshal(g)
|
|
|
+}
|
|
|
+
|
|
|
+func (g *ObjectDataInfo) UnmarshalBinary(data []byte) (err error){
|
|
|
+ return json.Unmarshal(data, g)
|
|
|
+}
|