NotificationStatusEnum.php
549 Bytes
<?php
namespace App\Enums;
enum NotificationStatusEnum: int
{
case CANCEL = -2;
case FAIL = -1;
case WAITING = 0;
case PROCESSING = 1;
case SUCCESS = 2;
case ROLLBACK = 3;
public function label(): string
{
return match ($this) {
self::WAITING => '待发送',
self::PROCESSING => '发送中',
self::SUCCESS => '已发送',
self::FAIL => '发送失败',
self::CANCEL => '发送取消',
self::ROLLBACK => '已撤销',
};
}
}