companies.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package companies
  2. import "surdeus.su/core/amo/common"
  3. type Company struct {
  4. ID int `json:"id"`
  5. Name string `json:"name,omitempty"`
  6. ResponsibleUserID int `json:"responsible_user_id,omitempty"`
  7. GroupID int `json:"group_id,omitempty"`
  8. CreatedBy int `json:"created_by,omitempty"`
  9. UpdatedBy int `json:"updated_by,omitempty"`
  10. CreatedAt int `json:"created_at,omitempty"`
  11. UpdatedAt int `json:"updated_at,omitempty"`
  12. ClosestTaskAt interface{} `json:"closest_task_at,omitempty"`
  13. CustomFieldsValues common.CustomFieldsValues `json:"custom_fields_values,omitempty"`
  14. AccountID int `json:"account_id,omitempty"`
  15. Links Links `json:"_links,omitempty"`
  16. Embedded Embedded `json:"_embedded,omitempty"`
  17. }
  18. type Self struct {
  19. Href string `json:"href"`
  20. }
  21. type Links struct {
  22. Self Self `json:"self"`
  23. }
  24. type Contacts struct {
  25. ID int `json:"id"`
  26. }
  27. type Embedded struct {
  28. Tags []interface{} `json:"tags"`
  29. Contacts []*Contacts `json:"contacts"`
  30. }
  31. type Companies struct {
  32. Page int `json:"_page"`
  33. Links struct {
  34. Self struct {
  35. Href string `json:"href"`
  36. } `json:"self"`
  37. Next struct {
  38. Href string `json:"href"`
  39. } `json:"next"`
  40. } `json:"_links"`
  41. Embedded struct {
  42. Companies []Company `json:"companies"`
  43. } `json:"_embedded"`
  44. }