biz_object_data_info.go 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. package viewmodels
  2. import (
  3. "encoding/json"
  4. "time"
  5. )
  6. type BizObjectDataInfo struct {
  7. BizId int64 `json:"bizId" xorm:"'biz_id' bigint pk comment('主键ID') "`
  8. BizTitle string `json:"bizTitle" xorm:"'biz_title' varchar(127) comment('Biz Title') "`
  9. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint pk comment('主键ID') "`
  10. ObjectType int64 `json:"objectType" xorm:"'object_type' bigint comment('Type') "`
  11. ObjectTitle string `json:"objectTitle" xorm:"'object_title' varchar(127) comment('模型名称') "`
  12. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('模型名称') "`
  13. Comment string `json:"comment" xorm:"'comment' varchar(255) comment('描述') "`
  14. IsFixed int64 `json:"isFixed" xorm:"'is_fixed' int comment('是否可修改') "`
  15. DeletedAt time.Time `json:"deletedAt" xorm:"'deleted_at'"`
  16. Attrs []BizObjectAttrInfo `json:"attrs"`
  17. }
  18. func (t *BizObjectDataInfo) TableName() string {
  19. return "biz_object"
  20. }
  21. func (g *BizObjectDataInfo) MarshalBinary() (data []byte, err error){
  22. return json.Marshal(g)
  23. }
  24. func (g *BizObjectDataInfo) UnmarshalBinary(data []byte) (err error){
  25. return json.Unmarshal(data, g)
  26. }