structs.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. package abango
  2. import (
  3. "github.com/go-xorm/xorm"
  4. )
  5. var (
  6. XConfig map[string]string
  7. FrontVars map[string]string //Fronrt End Server Variables
  8. )
  9. var (
  10. XDB *xorm.Engine // 더 이상 쓰지 않음 2024에 없앨것
  11. CrystalDB *xorm.Engine // 더 이상 쓰지 않음 2024에 없앨것
  12. )
  13. // 1. Receivers /////////////////////////////////////////////////////////////////
  14. // 1. Receivers /////////////////////////////////////////////////////////////////
  15. type Param struct {
  16. Key string
  17. Value string
  18. }
  19. type Controller struct {
  20. // Ctx *context.Context
  21. Ctx Context
  22. actionName string
  23. controllerName string
  24. ServerVars map[string]string //Fronrt End Server Variables
  25. GlobalVars map[string]string //Fronrt End Global Variables
  26. Data map[interface{}]interface{}
  27. Access AbangoAccess
  28. GateToken string
  29. UpdateFieldList string
  30. Gtb GateTokenBase
  31. Db *xorm.Engine
  32. V interface{}
  33. }
  34. type Context struct {
  35. Ask AbangoAsk
  36. Answer AbangoAnswer
  37. ReturnTopic string
  38. }
  39. type AbangoAsk struct {
  40. ApiType string
  41. AskName string
  42. AccessToken string
  43. UniqueId string
  44. DocRoot string
  45. Body []byte
  46. ServerParams []Param
  47. }
  48. type AbangoAnswer struct {
  49. Body []byte
  50. }
  51. type AbangoAccess struct {
  52. UserId int64
  53. UserGuid string
  54. UserName string
  55. NickName string
  56. DbType string
  57. DbConnStr string
  58. }
  59. type GateTokenBase struct {
  60. ConnStr string `yaml:"conn_str"` //Only from Custom.yml
  61. ConnString string //RealConnection String
  62. RemoteIp string `yaml:"remote_ip"`
  63. DeviceDesc string `yaml:"device_desc"`
  64. FrontIp string `yaml:"front_ip"`
  65. FrontHost string `yaml:"front_host"`
  66. Referer string `yaml:"referer"`
  67. SsoSubId int `yaml:"sso_sub_id"`
  68. UserId int `yaml:"user_id"`
  69. UserPermId int `yaml:"user_perm_id"`
  70. MemberId int `yaml:"member_id"`
  71. MemberPermId int `yaml:"member_perm_id"`
  72. SgroupId int `yaml:"sgroup_id"`
  73. BranchId int `yaml:"branch_id"`
  74. StorageId int `yaml:"storage_id"`
  75. AgroupId int `yaml:"agroup_id"`
  76. MemberBuyerId int `yaml:"member_buyer_id"`
  77. MemberCompanyId int `yaml:"member_company_id"`
  78. CompanySort string `yaml:"company_sort"`
  79. SalesQtyPoint int `yaml:"sales_qty_point"`
  80. SalesPrcPoint int `yaml:"sales_prc_point"`
  81. SalesAmtPoint int `yaml:"sales_amt_point"`
  82. PurchQtyPoint int `yaml:"purch_qty_point"`
  83. PurchPrcPoint int `yaml:"purch_prc_point"`
  84. PurchAmtPoint int `yaml:"purch_amt_point"`
  85. StockQtyPoint int `yaml:"stock_qty_point"`
  86. StockPrcPoint int `yaml:"stock_prc_point"`
  87. StockAmtPoint int `yaml:"stock_amt_point"`
  88. AccAmtPoint int `yaml:"acc_amt_point"`
  89. OfcCode string `yaml:"ofc_code"`
  90. }
  91. type GateTokenBaseOld struct {
  92. ConnString string
  93. RemoteIp string
  94. DeviceDesc string
  95. FrontIp string
  96. FrontHost string
  97. Referer string
  98. SsoSubId int
  99. UserId int
  100. UserPermId int
  101. MemberId int
  102. MemberPermId int
  103. SgroupId int
  104. BranchId int
  105. StorageId int
  106. AgroupId int
  107. MemberBuyerId int
  108. MemberCompanyId int
  109. CompanySort string
  110. SalesQtyPoint int
  111. SalesPrcPoint int
  112. SalesAmtPoint int
  113. PurchQtyPoint int
  114. PurchPrcPoint int
  115. PurchAmtPoint int
  116. StockQtyPoint int
  117. StockPrcPoint int
  118. StockAmtPoint int
  119. AccAmtPoint int
  120. OfcCode string
  121. }