BrokerPushLevelRecordStatusEnum.php 493 Bytes
<?php

namespace App\Enums;

enum BrokerPushLevelRecordStatusEnum: int
{
    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::ROLLBACK => '已撤销',
        };
    }
}