This commit is contained in:
2025-10-29 15:32:26 +08:00
parent d90614805b
commit b7462657cd
78921 changed files with 2753938 additions and 71 deletions

View File

@@ -0,0 +1,55 @@
<?php
/**
*/
namespace addon\coupon\dict;
/**
* 订单公共属性
*/
class CouponDict
{
const normal = 1;
const used = 2;
const expire = 3;
const close = 4;
/**
* 优惠券状态
* @param $status
* @return string|string[]
*/
public static function getStatus($status = ''){
$list = [
self::normal => '待使用',
self::used => '已使用',
self::expire => '已过期',
self::close => '已关闭',
];
if($status) return $list[$status] ?? '';
return $list;
}
const all = 1;
const selected = 2;
const selected_out = 3;
public static function getGoodsType($type = ''){
$list = [
self::all => '全部商品参与',
self::selected => '指定商品参与',
self::selected_out => '指定不参与商品'
];
if($type) return $list[$type] ?? '';
return $list;
}
}