model.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package zoho
  2. // const PROXY_URL = "https://proxy.pbx.zycoo.com"
  3. type OauthServerInfoResp struct {
  4. Result string `json:"result"`
  5. Locations Location `json:"locations"`
  6. }
  7. type Location struct {
  8. Eu string `json:"eu"`
  9. Au string `json:"au"`
  10. In string `json:"in"`
  11. Jp string `json:"jp"`
  12. Uk string `json:"uk"`
  13. Us string `json:"us"`
  14. Ca string `json:"ca"`
  15. Sa string `json:"Sa"`
  16. }
  17. type UserCodeResp struct {
  18. UserCode string `json:"user_code"`
  19. DeviceCode string `json:"device_code"`
  20. Interval int `json:"interval"`
  21. VerificationUriComplete string `json:"verification_uri_complete"`
  22. ExpiresIn int `json:"expires_in"`
  23. VerificationUrl string `json:"verification_url"`
  24. }
  25. type TokenResp struct {
  26. AccessToken string `json:"access_token"`
  27. RefreshToken string `json:"refresh_token"`
  28. ApiDomain string `json:"api_domain"`
  29. TokenType string `json:"token_type"`
  30. ExpiresIn int `json:"expires_in"`
  31. }
  32. type RefreshTokenResp struct {
  33. AccessToken string `json:"access_token"`
  34. ApiDomain string `json:"api_domain"`
  35. TokenType string `json:"token_type"`
  36. ExpiresIn int `json:"expires_in"`
  37. }
  38. type TabZohouser struct {
  39. ID int `xorm:"id pk autoincr" form:"id" json:"id"`
  40. UserId string `xorm:"'userid'" form:"userid" json:"userid"`
  41. UserName string `xorm:"'username'" form:"username" json:"username"`
  42. Exten string `xorm:"'exten'" form:"exten" json:"exten"`
  43. }
  44. func (*TabZohouser) TableName() string {
  45. return "t_crm_user"
  46. }