enums.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. use App\Repositories\Enums\ResponseCodeEnum;
  11. use App\Repositories\Enums\ModelStatusEnum;
  12. use App\Repositories\Enums\CourseCommentStatusEnum;
  13. use App\Repositories\Enums\CourseRecEnum;
  14. use App\Repositories\Enums\CourseTypeEnum;
  15. use App\Repositories\Enums\VideoWatchEnum;
  16. use App\Repositories\Enums\SexEnum;
  17. use App\Repositories\Enums\Course\StudentTypeEnum;
  18. use App\Repositories\Enums\Base\BannerPositionEnum;
  19. use App\Repositories\Enums\Base\BannerClickTypeEnum;
  20. use App\Repositories\Enums\CMS\SettingTypeEnum;
  21. use App\Repositories\Enums\CMS\CategorySingleEnum;
  22. use App\Repositories\Enums\Base\RoleEnum;
  23. use App\Repositories\Enums\Exam\IsOpenEnum;
  24. use App\Repositories\Enums\Exam\TypeEnum;
  25. use App\Repositories\Enums\Exam\LevelEnum;
  26. use App\Repositories\Enums\Area\AreaTypeEnum;
  27. return [
  28. //区域
  29. AreaTypeEnum::class => [
  30. AreaTypeEnum::AREA => '区',
  31. AreaTypeEnum::VILLAGE => '村'
  32. ],
  33. // //课程
  34. // StudentTypeEnum::class => [
  35. // StudentTypeEnum::XY => '学员',
  36. // StudentTypeEnum::ZJ => '助教',
  37. // ],
  38. // //试题
  39. // IsOpenEnum::class => [
  40. // IsOpenEnum::P => '私有',
  41. // IsOpenEnum::GG => '公共',
  42. // ],
  43. // TypeEnum::class => [
  44. // TypeEnum::XUANZE => '选择题',
  45. // TypeEnum::PANDUAN => '判断题',
  46. // TypeEnum::TIANKONG => '填空题',
  47. // TypeEnum::JIANDA => '简单题',
  48. // TypeEnum::DUOXUAN => '多选题',
  49. // ],
  50. // LevelEnum::class => [
  51. // LevelEnum::JIANDAN => '简单',
  52. // LevelEnum::SHIZHONG => '一般',
  53. // LevelEnum::KUNNAN => '困难',
  54. // ],
  55. //
  56. // //CMS
  57. // SettingTypeEnum::class => [
  58. // SettingTypeEnum::STARING => '字符串',
  59. // SettingTypeEnum::IMG => '图片',
  60. // SettingTypeEnum::TEXT => '文本'
  61. // ],
  62. // CategorySingleEnum::class => [
  63. // CategorySingleEnum::ARTICLE => '单文章',
  64. // CategorySingleEnum::ARTICLES => '文章列表',
  65. // CategorySingleEnum::OTHER => '其他'
  66. // ],
  67. // 基础
  68. SexEnum::class => [
  69. SexEnum::NO => '未知',
  70. SexEnum::MAN => '男',
  71. SexEnum::WOMAN => '女'
  72. ],
  73. ModelStatusEnum::class => [
  74. ModelStatusEnum::PAUSE => '隐藏',
  75. ModelStatusEnum::OK => '显示',
  76. ],
  77. BannerPositionEnum::class => [
  78. BannerPositionEnum::HOME => '首页轮播图'
  79. ],
  80. BannerClickTypeEnum::class => [
  81. BannerClickTypeEnum::NO => '无操作',
  82. BannerClickTypeEnum::LINK => '连接跳转',
  83. ],
  84. // RoleEnum::class => [
  85. // RoleEnum::STUDENT => '学生',
  86. // RoleEnum::TEACHER => '老师',
  87. // ],
  88. RoleEnum::class => [
  89. RoleEnum::USER => '用户',
  90. RoleEnum::ADMIN => '管理员',
  91. RoleEnum::PROJECT => '项目管理员',
  92. ],
  93. // 响应状态码
  94. ResponseCodeEnum::class => [
  95. // 成功
  96. ResponseCodeEnum::HTTP_OK => '操作成功', // 自定义 HTTP 状态码返回消息
  97. ResponseCodeEnum::HTTP_UNAUTHORIZED => '授权失败',
  98. // 业务操作成功
  99. ResponseCodeEnum::SERVICE_REGISTER_SUCCESS => '注册成功',
  100. ResponseCodeEnum::SERVICE_LOGIN_SUCCESS => '登录成功',
  101. // 客户端错误
  102. ResponseCodeEnum::CLIENT_PARAMETER_ERROR => '参数错误',
  103. ResponseCodeEnum::CLIENT_CREATED_ERROR => '数据已存在',
  104. ResponseCodeEnum::CLIENT_DELETED_ERROR => '数据不存在',
  105. ResponseCodeEnum::CLIENT_VALIDATION_ERROR => '表单验证错误',
  106. // 服务端错误
  107. ResponseCodeEnum::SYSTEM_ERROR => '服务器错误',
  108. ResponseCodeEnum::SYSTEM_UNAVAILABLE => '服务器正在维护,暂不可用',
  109. ResponseCodeEnum::SYSTEM_CACHE_CONFIG_ERROR => '缓存配置错误',
  110. ResponseCodeEnum::SYSTEM_CACHE_MISSED_ERROR => '缓存未命中',
  111. ResponseCodeEnum::SYSTEM_CONFIG_ERROR => '系统配置错误',
  112. // 业务操作失败:授权业务
  113. ResponseCodeEnum::SERVICE_REGISTER_ERROR => '注册失败',
  114. ResponseCodeEnum::SERVICE_LOGIN_ERROR => '登录失败',
  115. ],
  116. // 课程
  117. VideoWatchEnum::class => [
  118. VideoWatchEnum::OK => '已看完',
  119. VideoWatchEnum::NO => '未看完'
  120. ],
  121. CourseRecEnum::class => [
  122. CourseRecEnum::NO => '普通',
  123. CourseRecEnum::OK => '推荐'
  124. ],
  125. CourseCommentStatusEnum::class => [
  126. CourseCommentStatusEnum::OK => '打开评论',
  127. CourseCommentStatusEnum::NO => '关闭评论',
  128. ],
  129. CourseTypeEnum::class => [
  130. CourseTypeEnum::RECORDED => '录播课'
  131. ],
  132. // VisitEnum::class => [
  133. // VisitEnum::NO => '初诊',
  134. // VisitEnum::YES => '复诊'
  135. // ],
  136. // // 角色
  137. // RoleEnum::class => [
  138. // RoleEnum::SUPER_ADMIN => '超级管理员',
  139. // RoleEnum::GUEST => '游客',
  140. // RoleEnum::ADMIN => '管理员',
  141. // ],
  142. // // 权限
  143. // PermissionEnum::class => [
  144. // PermissionEnum::SYSTEM_ACTIVITY_LOG_CLEAN => '清理活动日志',
  145. // PermissionEnum::SYSTEM_CACHE_CLEAR => '清理缓存',
  146. //
  147. // PermissionEnum::ROUTE_USERS => '用户管理',
  148. // PermissionEnum::ROUTE_USERS_CREATE => '创建用户',
  149. // PermissionEnum::ROUTE_USERS_DELETE => '删除用户',
  150. // PermissionEnum::ROUTE_USERS_UPDATE => '更新用户资料',
  151. // PermissionEnum::ROUTE_USERS_VIEW => '查询用户资料',
  152. // PermissionEnum::ROUTE_USERS_VIEW_ANY => '查询用户列表',
  153. //
  154. // PermissionEnum::ROUTE_POSTS => ' 文章管理',
  155. // PermissionEnum::ROUTE_POSTS_CREATE => '发布文章',
  156. // PermissionEnum::ROUTE_POSTS_DELETE => '删除文章',
  157. // PermissionEnum::ROUTE_POSTS_UPDATE => '更新文章',
  158. // PermissionEnum::ROUTE_POSTS_VIEW => '查看文章',
  159. // PermissionEnum::ROUTE_POSTS_VIEW_ANY => '查询文章列表',
  160. // ],
  161. ];