item.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Author : Eric Kim
  2. // Build Date : 23 Jul 2008 Last Update 02 Aug 2008
  3. // End-Agent for Passcon Multi OS go binding with Windows, MacOS, iOS, and Android
  4. // All rights are reserved.
  5. package model
  6. type ItemInfo struct {
  7. SolutionName SolutionType
  8. Version string
  9. Emails []string
  10. DomainName string
  11. DomainURI string
  12. ItemName string
  13. ItemNick string
  14. ModelName string
  15. ModelNo string
  16. BrandName string
  17. Sku string
  18. ItemCategory []string
  19. Manufacturer string
  20. Origin string
  21. Language string
  22. Currency string
  23. SalesPrice float32
  24. DeliveryPrice float32
  25. MinimumQty float32
  26. UserCredit float32
  27. Options []Option
  28. Images []string
  29. ShortDesc string
  30. OriginDesc string
  31. TextDesc string
  32. HashUrl string
  33. HashContent string
  34. Suggest []string `json:"suggest"`
  35. Cats []string `json:"cats"`
  36. }
  37. type SolutionType string
  38. var (
  39. SolutionTypeWooCommerce SolutionType = "WOOCOMMERCE"
  40. SolutionTypeDabory SolutionType = "dbrshop"
  41. SolutionTypeShopify SolutionType = "SHOPIFY"
  42. SolutionTypeMagento SolutionType = "MAGENTO"
  43. SolutionTypeCafe24 SolutionType = "CAFE24"
  44. SolutionTypeGodo SolutionType = "GODO"
  45. SolutionTypeYoung SolutionType = "YOUNG"
  46. SolutionTypeOthers SolutionType = "OTHERS"
  47. )
  48. type Option struct {
  49. Name string
  50. Choices []Choice
  51. }
  52. type Choice struct {
  53. Name string
  54. Price float32
  55. }
  56. type Image struct {
  57. Path string
  58. Width int `json:"-"`
  59. Height int `json:"-"`
  60. }
  61. type Suggester struct {
  62. Input []string `json:"input"`
  63. Weight int `json:"weight"`
  64. }
  65. type MatchingConfig struct {
  66. Name string `json:"name"`
  67. Regex string `json:"regex"`
  68. Images string `json:"images"`
  69. Price string `json:"price"`
  70. Category string `json:"category"`
  71. ShortDesc string `json:"short_desc"`
  72. OriginDesc string `json:"origin_desc"`
  73. TextDesc string `json:"text_desc"`
  74. Options string `json:"options"`
  75. Email string `json:"email"`
  76. }