structs.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 locals
  6. import (
  7. "github.com/go-xorm/xorm"
  8. )
  9. // 0. Controller /////////////////////////////////////////////////////////////////
  10. type SyncController struct {
  11. // Ctx *context.Context
  12. UpdateFieldList string
  13. Scb SyncControllerBase
  14. Db *xorm.Engine
  15. }
  16. var GSync SyncController
  17. type SyncControllerBase struct {
  18. ConnString string
  19. OfcCode string
  20. }
  21. // 1. DB /////////////////////////////////////////////////////////////////
  22. type DbCom struct {
  23. StartTime int64 `xorm:"created"`
  24. EndTime int64
  25. UpdateTime int64 `xorm:"updated"`
  26. Ip string
  27. Usr int64
  28. }
  29. // 2. Request /////////////////////////////////////////////////////////////////
  30. type ListFormBalanceVars struct {
  31. YyyyMm string
  32. SelectedId int
  33. StartCode string
  34. EndCode string
  35. }
  36. // 2. Response /////////////////////////////////////////////////////////////////
  37. type ProductPage struct {
  38. SolutionType string
  39. ThemeType string
  40. ProductPage []Product
  41. }
  42. type Product struct {
  43. SolutionName SolutionType
  44. Version string
  45. Emails []string
  46. DomainName string
  47. DomainURI string
  48. ItemName string
  49. ItemNick string
  50. ModelName string
  51. ModelNo string
  52. BrandName string
  53. Sku string
  54. ItemCategory []string
  55. Manufacturer string
  56. Origin string
  57. Language string
  58. Currency string
  59. SalesPrice float32
  60. DeliveryPrice float32
  61. MinimumQty float32
  62. UserCredit float32
  63. Options []Option
  64. Images []string
  65. ShortDesc string
  66. OriginDesc string
  67. TextDesc string
  68. HashUrl string
  69. HashContent string
  70. Suggest []string `json:"suggest"`
  71. Cats []string `json:"cats"`
  72. }
  73. type SolutionType string
  74. var (
  75. SolutionTypeWooCommerce SolutionType = "WOOCOMMERCE"
  76. SolutionTypeShopify SolutionType = "SHOPIFY"
  77. SolutionTypeMagento SolutionType = "MAGENTO"
  78. SolutionTypeCafe24 SolutionType = "CAFE24"
  79. SolutionTypeGodo SolutionType = "GODO"
  80. SolutionTypeYoung SolutionType = "YOUNG"
  81. SolutionTypeOthers SolutionType = "OTHERS"
  82. )
  83. type Option struct {
  84. Name string
  85. Choices []Choice
  86. }
  87. type Choice struct {
  88. Name string
  89. Price float32
  90. }
  91. type Image struct {
  92. Path string
  93. Width int `json:"-"`
  94. Height int `json:"-"`
  95. }
  96. type AbangoApp struct {
  97. YDB *xorm.Engine
  98. }