ActivityStatusEnum.php 539 Bytes
<?php

namespace App\Enums;

enum ActivityStatusEnum: int
{
    case PROCESS = 0;
    case UP = 1;
    case DOWN = 2;
    case MATCH = 3;
    case FAIL = 4;
    case SEND = 5;

    /**
     * @return string
     */
    public function label(): string
    {
        return match ($this) {
            self::PROCESS => '处理中',
            self::UP => '上架',
            self::DOWN => '下架',
            self::MATCH => '已匹配',
            self::FAIL => '处理失败',
            self::SEND => '已发行'
        };
    }
}