structs.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. // !!!여기를 수정할 경ㅇ (1)UpdateGtb (2)MemberLogin (3)MemberLogin 을 수정해야 한다.
  60. type GateTokenBase struct {
  61. ConnStr string `yaml:"conn_str"` //Only from Custom.yml
  62. ConnString string //RealConnection String
  63. RemoteIp string `yaml:"remote_ip"`
  64. DeviceDesc string `yaml:"device_desc"`
  65. FrontIp string `yaml:"front_ip"`
  66. FrontHost string `yaml:"front_host"`
  67. Referer string `yaml:"referer"`
  68. SsoSubId int `yaml:"sso_sub_id"`
  69. UserId int `yaml:"user_id"`
  70. UserPermId int `yaml:"user_perm_id"`
  71. MemberId int `yaml:"member_id"`
  72. MemberPermId int `yaml:"member_perm_id"`
  73. SellerId int `yaml:"seller_id"`
  74. SgroupId int `yaml:"sgroup_id"`
  75. BranchId int `yaml:"branch_id"`
  76. StorageId int `yaml:"storage_id"`
  77. AgroupId int `yaml:"agroup_id"`
  78. MemberBuyerId int `yaml:"member_buyer_id"`
  79. MemberCompanyId int `yaml:"member_company_id"`
  80. CompanySort string `yaml:"company_sort"`
  81. SalesQtyPoint int `yaml:"sales_qty_point"`
  82. SalesPrcPoint int `yaml:"sales_prc_point"`
  83. SalesAmtPoint int `yaml:"sales_amt_point"`
  84. PurchQtyPoint int `yaml:"purch_qty_point"`
  85. PurchPrcPoint int `yaml:"purch_prc_point"`
  86. PurchAmtPoint int `yaml:"purch_amt_point"`
  87. StockQtyPoint int `yaml:"stock_qty_point"`
  88. StockPrcPoint int `yaml:"stock_prc_point"`
  89. StockAmtPoint int `yaml:"stock_amt_point"`
  90. AccAmtPoint int `yaml:"acc_amt_point"`
  91. OfcCode string `yaml:"ofc_code"`
  92. }