api_data_info.go 1.3 KB

12345678910111213141516171819202122232425262728
  1. package viewmodels
  2. import "encoding/json"
  3. type ApiDataInfo struct {
  4. ModuleId int64 `json:"moduleId" xorm:"'module_id' bigint pk comment('Module ID') "`
  5. ModuleTitle string `json:"moduleTitle" xorm:"'module_title' varchar(127) comment('Module Title') "`
  6. ApiId int64 `json:"apiId" xorm:"'api_id' bigint pk comment('Api ID') "`
  7. ApiType int64 `json:"apiType" xorm:"'api_type' bigint pk comment('Api Type') "`
  8. ApiTitle string `json:"apiTitle" xorm:"'api_title' varchar(127) comment('名称') "`
  9. ApiCode string `json:"apiCode" xorm:"'api_code' varchar(127) comment('编码') "`
  10. ApiParams string `json:"apiParams" xorm:"'api_params' varchar(127) comment('Param') "`
  11. Status int64 `json:"status" xorm:"'status' bigint comment('Status') "`
  12. ApiDesc string `json:"apiDesc" xorm:"'api_desc' varchar(50) comment('描述') "`
  13. TransUnits []ApiTransUnitInfo `json:"transUnits"`
  14. }
  15. func (t *ApiDataInfo) TableName() string {
  16. return "ps_api"
  17. }
  18. func (g *ApiDataInfo) MarshalBinary() (data []byte, err error){
  19. return json.Marshal(g)
  20. }
  21. func (g *ApiDataInfo) UnmarshalBinary(data []byte) (err error){
  22. return json.Unmarshal(data, g)
  23. }