You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
409 B
26 lines
409 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Dictionary\Order;
|
|
|
|
/**
|
|
* 订单来源
|
|
*/
|
|
enum SourceId: int
|
|
{
|
|
case OFFICIAL_ACCOUNT = 0;
|
|
|
|
case MINI_PROGRAM = 1;
|
|
|
|
/**
|
|
* Label string
|
|
*/
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::OFFICIAL_ACCOUNT => '微信公众号',
|
|
self::MINI_PROGRAM => '微信小程序',
|
|
};
|
|
}
|
|
}
|
|
|