errorcode.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. const SUCCESS = 0;
  3. const NOTHING_UPDATE = 1;
  4. const REQUEST_SUCCESS = 0;
  5. const REQUEST_PARAM_ERROR = 101;
  6. const REQUEST_DATABASE_ERROR = 102;
  7. const PARAM_ARRAY_INT = 103;
  8. const EMPTY_USER_NAME = 110;
  9. const EMPTY_USER_ID = 111;
  10. const INVALID_USER_ID = 112;
  11. const EMPTY_USER_PASSWORD = 113;
  12. const EMPTY_ROLE_NAME = 220;
  13. const EMPTY_ROLE_ID = 221;
  14. const INVALID_ROLE_ID = 222;
  15. const ALREADY_EXIST_ROLE = 223;
  16. const EMPTY_OWNER_TYPE = 310;
  17. const EMPTY_OWNER_ID = 311;
  18. const EMPTY_BAR_ID = 410;
  19. const PERMISSION_DENIED = 403;
  20. const INVALID_U_A_ID = 510;
  21. const EMPTY_GROUP_NAME = 610;
  22. const EMPTY_GROUP_ID = 611;
  23. const REPEAT_GROUP_NAME = 612;
  24. const INVALID_GROUP_ID = 613;
  25. const EMPTY_GROUP_USER_ID = 710;
  26. const INVALID_GROUP_USER_ID = 711;
  27. const EMPTY_ACTION_BAR_NAME = 810;
  28. const EMPTY_ACTION_BAR_ID = 811;
  29. const INVALID_ACTION_BAR_ID= 812;
  30. const INVALID_ACTION_PARENT = 813;
  31. return [
  32. "0" => "success",
  33. "1" => "nothing to update",
  34. "101" => "params error",
  35. "102" => "database operation error",
  36. "103" => "params should be int array",
  37. "111" => "empty user id",
  38. "112" => "invalid user id",
  39. "220" => "empty role name",
  40. "221" => "empty role id",
  41. "222" => "invalid role id",
  42. "223" => "already exist role",
  43. "310" => "empty owner type",
  44. "311" => "empty owner id",
  45. "410" => "empty action bar id",
  46. "403" => "permission denied",
  47. "510" => "invalid user-action-bar id",
  48. "610" => "empty group name",
  49. "611" => "empty group id",
  50. "612" => "repeat group name",
  51. "613" => "invalid group id",
  52. "710" => "empty group-user id",
  53. "711" => "invalid group-user id",
  54. "810" => "empty action-bar name",
  55. "811" => "empty action-bar id",
  56. "812" => "invalid action-bar id",
  57. "813" => "invalid action-bar parent",
  58. ];