api_info.go 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package viewmodels
  2. import "encoding/json"
  3. type ApiInfo 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. BizId int64 `json:"bizId" xorm:"'biz_id' bigint comment('Biz Id') "`
  14. ObjectType int64 `json:"objectType" xorm:"'object_type' bigint comment('Object Type') "`
  15. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint comment('Object Id') "`
  16. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('Object Code') "`
  17. OamId int64 `json:"oamId" xorm:"'oam_id' bigint comment('Oam Id') "`
  18. OamTitle string `json:"oamTitle" xorm:"'oam_title' varchar(127) comment('OAMTitle') "`
  19. OamCode string `json:"oamCode" xorm:"'oam_code' varchar(127) comment('OAMCode') "`
  20. OamType int64 `json:"oamType" xorm:"'oam_type' bigint comment('Oam Type') "`
  21. SqlType int64 `json:"sqlType" xorm:"'sql_type' bigint comment('Sql Type') "`
  22. SqlStatement string `json:"sqlStatement" xorm:"'sql_statement' varchar(1023) comment('Statement') "`
  23. SqlSelect string `json:"sqlSelect" xorm:"'sql_select' varchar(1023) comment('Sql Select') "`
  24. SqlFrom string `json:"sqlFrom" xorm:"'sql_from' varchar(1023) comment('Sql From') "`
  25. SqlWhere string `json:"sqlWhere" xorm:"'sql_where' varchar(1023) comment('Sql Where') "`
  26. SqlOrder string `json:"sqlOrder" xorm:"'sql_order' varchar(1023) comment('Sql Order') "`
  27. SqlCount string `json:"sqlCount" xorm:"'sql_count' varchar(1023) comment('Sql Count') "`
  28. OamDesc string `json:"oamDesc" xorm:"'oam_desc' varchar(1023) comment('描述') "`
  29. }
  30. func (t *ApiInfo) TableName() string {
  31. return "api"
  32. }
  33. func (g *ApiInfo) MarshalBinary() (data []byte, err error){
  34. return json.Marshal(g)
  35. }
  36. func (g *ApiInfo) UnmarshalBinary(data []byte) (err error){
  37. return json.Unmarshal(data, g)
  38. }