structs.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. }
  69. type SolutionType string
  70. var (
  71. SolutionTypeWooCommerce SolutionType = "WOOCOMMERCE"
  72. SolutionTypeShopify SolutionType = "SHOPIFY"
  73. SolutionTypeMagento SolutionType = "MAGENTO"
  74. SolutionTypeCafe24 SolutionType = "CAFE24"
  75. SolutionTypeGodo SolutionType = "GODO"
  76. SolutionTypeYoung SolutionType = "YOUNG"
  77. SolutionTypeOthers SolutionType = "OTHERS"
  78. )
  79. type Option struct {
  80. Name string
  81. Choices []Choice
  82. }
  83. type Choice struct {
  84. Name string
  85. Price float32
  86. }
  87. type Image struct {
  88. Path string
  89. Width int `json:"-"`
  90. Height int `json:"-"`
  91. }
  92. type AbangoApp struct {
  93. YDB *xorm.Engine
  94. }