model_object_data_info.go 1.3 KB

12345678910111213141516171819202122232425262728
  1. package viewmodels
  2. import "encoding/json"
  3. type ModelObjectDataInfo struct {
  4. ModelId int64 `json:"modelId" xorm:"'model_id' bigint pk comment('主键ID') "`
  5. ModelTitle string `json:"modelTitle" xorm:"'model_title' varchar(127) comment('Model Title')"`
  6. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint pk comment('主键ID') "`
  7. ObjectType int64 `json:"objectType" xorm:"'object_type' bigint comment('Type') "`
  8. ObjectTitle string `json:"objectTitle" xorm:"'object_title' varchar(127) comment('模型名称') "`
  9. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('模型名称') "`
  10. Comment string `json:"comment" xorm:"'comment' varchar(255) comment('描述') "`
  11. IsFixed int64 `json:"isFixed" xorm:"'is_fixed' int comment('是否可修改') "`
  12. Attrs []ModelObjectAttrInfo `json:"attrs"`
  13. }
  14. func (t *ModelObjectDataInfo) TableName() string {
  15. return "ds_object"
  16. }
  17. func (g *ModelObjectDataInfo) MarshalBinary() (data []byte, err error){
  18. return json.Marshal(g)
  19. }
  20. func (g *ModelObjectDataInfo) UnmarshalBinary(data []byte) (err error){
  21. return json.Unmarshal(data, g)
  22. }