api_info.go 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package viewmodels
  2. import "encoding/json"
  3. type ApiInfo struct {
  4. BizId int64 `json:"bizId" xorm:"'biz_id' bigint comment('Biz Id') "`
  5. BizTitle string `json:"bizTitle" xorm:"'biz_title' varchar(127) comment('Biz Title') "`
  6. ApiId int64 `json:"apiId" xorm:"'api_id' bigint pk comment('Api ID') "`
  7. ApiType int64 `json:"apiType" xorm:"'api_type' bigint comment('Api Type') "`
  8. ApiMethod int64 `json:"apiMethod" xorm:"'api_method' bigint comment('Api Method')"`
  9. ApiTitle string `json:"apiTitle" xorm:"'api_title' varchar(127) comment('名称') "`
  10. ApiCode string `json:"apiCode" xorm:"'api_code' varchar(127) comment('编码') "`
  11. ApiParams string `json:"apiParams" xorm:"'api_params' varchar(127) comment('Param') "`
  12. Status int64 `json:"status" xorm:"'status' bigint comment('Status') "`
  13. ApiDesc string `json:"apiDesc" xorm:"'api_desc' varchar(50) comment('描述') "`
  14. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint comment('Object Id') "`
  15. ObjectTitle string `json:"objectTitle" xorm:"'object_title' varchar(127) comment('Object Title') "`
  16. ObjectType int64 `json:"objectType" xorm:"'object_type' bigint comment('Object Type') "`
  17. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('Object Code') "`
  18. OamId int64 `json:"oamId" xorm:"'oam_id' bigint comment('Oam Id') "`
  19. OamTitle string `json:"oamTitle" xorm:"'oam_title' varchar(127) comment('OAMTitle') "`
  20. OamCode string `json:"oamCode" xorm:"'oam_code' varchar(127) comment('OAMCode') "`
  21. OamType int64 `json:"oamType" xorm:"'oam_type' bigint comment('Oam Type') "`
  22. SqlType int64 `json:"sqlType" xorm:"'sql_type' bigint comment('Sql Type') "`
  23. SqlStatement string `json:"sqlStatement" xorm:"'sql_statement' varchar(1023) comment('Statement') "`
  24. SqlSelect string `json:"sqlSelect" xorm:"'sql_select' varchar(1023) comment('Sql Select') "`
  25. SqlFrom string `json:"sqlFrom" xorm:"'sql_from' varchar(1023) comment('Sql From') "`
  26. SqlWhere string `json:"sqlWhere" xorm:"'sql_where' varchar(1023) comment('Sql Where') "`
  27. SqlOrder string `json:"sqlOrder" xorm:"'sql_order' varchar(1023) comment('Sql Order') "`
  28. SqlCount string `json:"sqlCount" xorm:"'sql_count' varchar(1023) comment('Sql Count') "`
  29. OamDesc string `json:"oamDesc" xorm:"'oam_desc' varchar(1023) comment('描述') "`
  30. }
  31. func (t *ApiInfo) TableName() string {
  32. return "api"
  33. }
  34. func (g *ApiInfo) MarshalBinary() (data []byte, err error){
  35. return json.Marshal(g)
  36. }
  37. func (g *ApiInfo) UnmarshalBinary(data []byte) (err error){
  38. return json.Unmarshal(data, g)
  39. }