structs.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. SellerId int `yaml:"seller_id"`
  73. SgroupId int `yaml:"sgroup_id"`
  74. BranchId int `yaml:"branch_id"`
  75. StorageId int `yaml:"storage_id"`
  76. AgroupId int `yaml:"agroup_id"`
  77. MemberBuyerId int `yaml:"member_buyer_id"`
  78. MemberCompanyId int `yaml:"member_company_id"`
  79. CompanySort string `yaml:"company_sort"`
  80. SalesQtyPoint int `yaml:"sales_qty_point"`
  81. SalesPrcPoint int `yaml:"sales_prc_point"`
  82. SalesAmtPoint int `yaml:"sales_amt_point"`
  83. PurchQtyPoint int `yaml:"purch_qty_point"`
  84. PurchPrcPoint int `yaml:"purch_prc_point"`
  85. PurchAmtPoint int `yaml:"purch_amt_point"`
  86. StockQtyPoint int `yaml:"stock_qty_point"`
  87. StockPrcPoint int `yaml:"stock_prc_point"`
  88. StockAmtPoint int `yaml:"stock_amt_point"`
  89. AccAmtPoint int `yaml:"acc_amt_point"`
  90. OfcCode string `yaml:"ofc_code"`
  91. }