Scene.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\common\enum\user\balanceLog;
  10. use app\common\enum\EnumBasics;
  11. /**
  12. * 余额变动场景枚举类
  13. * Class Scene
  14. * @package app\common\enum\user\balanceLog
  15. */
  16. class Scene extends EnumBasics
  17. {
  18. // 用户充值
  19. const RECHARGE = 10;
  20. // 用户消费
  21. const CONSUME = 20;
  22. // 管理员操作
  23. const ADMIN = 30;
  24. // 订单退款
  25. const REFUND = 40;
  26. /**
  27. * 获取订单类型值
  28. * @return array
  29. */
  30. public static function data()
  31. {
  32. return [
  33. self::RECHARGE => [
  34. 'name' => '用户充值',
  35. 'value' => self::RECHARGE,
  36. 'describe' => '用户充值:%s',
  37. ],
  38. self::CONSUME => [
  39. 'name' => '用户消费',
  40. 'value' => self::CONSUME,
  41. 'describe' => '用户消费:%s',
  42. ],
  43. self::ADMIN => [
  44. 'name' => '管理员操作',
  45. 'value' => self::ADMIN,
  46. 'describe' => '后台管理员 [%s] 操作',
  47. ],
  48. self::REFUND => [
  49. 'name' => '订单退款',
  50. 'value' => self::REFUND,
  51. 'describe' => '订单退款:%s',
  52. ],
  53. ];
  54. }
  55. }