<?php

namespace App\Enums;

enum ContentStatus: int
{
    case DRAFT = 0;
    case PUBLISHED = 1;
    case OFFLINE = 2;

    public function label(): string
    {
        return match ($this) {
            self::DRAFT => '草稿',
            self::PUBLISHED => '已发布',
            self::OFFLINE => '已下线',
        };
    }

    public function badge(): string
    {
        return match ($this) {
            self::DRAFT => 'warning',
            self::PUBLISHED => 'success',
            self::OFFLINE => 'danger',
        };
    }
}
