// +---------------------------------------------------------------------- declare (strict_types=1); namespace app\common\enum; /** * 枚举类:商品的优惠方式 * Class OrderType * @package app\common\enum */ class DiscountType extends EnumBasics { // 优惠券 const COUPON = 'coupon'; // 积分抵扣 const POINTS = 'points'; // 会员等级折扣 const GRADE = 'grade'; /** * 获取全部类型 * @return array */ public static function data(): array { return [ self::COUPON => [ 'name' => '优惠券', 'value' => self::COUPON, ], self::POINTS => [ 'name' => '积分抵扣', 'value' => self::POINTS, ], self::GRADE => [ 'name' => '会员等级折扣', 'value' => self::GRADE, ], ]; } }