DiscountType.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2024 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\common\enum;
  13. /**
  14. * 枚举类:商品的优惠方式
  15. * Class OrderType
  16. * @package app\common\enum
  17. */
  18. class DiscountType extends EnumBasics
  19. {
  20. // 优惠券
  21. const COUPON = 'coupon';
  22. // 积分抵扣
  23. const POINTS = 'points';
  24. // 会员等级折扣
  25. const GRADE = 'grade';
  26. /**
  27. * 获取全部类型
  28. * @return array
  29. */
  30. public static function data(): array
  31. {
  32. return [
  33. self::COUPON => [
  34. 'name' => '优惠券',
  35. 'value' => self::COUPON,
  36. ],
  37. self::POINTS => [
  38. 'name' => '积分抵扣',
  39. 'value' => self::POINTS,
  40. ],
  41. self::GRADE => [
  42. 'name' => '会员等级折扣',
  43. 'value' => self::GRADE,
  44. ],
  45. ];
  46. }
  47. }