constant.go 641 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package constant
  2. type OCTYPE int64
  3. const (
  4. OCTYPE_ADMIN = 1
  5. OCTYPE_ENT = 2
  6. OCTYPE_ORG = 3
  7. OCTYPE_PARTNER = 4
  8. )
  9. const (
  10. ROLE_TYPE_SYS = 1
  11. ROLE_TYPE_USER = 2
  12. )
  13. const (
  14. SUPER_ROLE = 1
  15. OP_ROLE_ADMIN = 2
  16. OP_ROLE_USER = 3
  17. ORG_ROLE_ADMIN = 4
  18. ORG_ROLE_USER = 5
  19. ENT_ROLE_ADMIN = 6
  20. ENT_USER_ROLE = 7
  21. PARTNER_ROLE_ADMIN = 8
  22. PARTNER_ROLE_USER = 9
  23. )
  24. // RetCode Result Code
  25. type RetCode int
  26. // Result Code List
  27. const (
  28. RetOk RetCode = 0
  29. RetErr RetCode = 500
  30. )
  31. type JsonResult struct {
  32. Code RetCode `json:"code"`
  33. Msg interface{} `json:"msg"`
  34. Data interface{} `json:"data"`
  35. }