<?php

namespace Kylin\Community\Enums;

/**
 * 活动状态
 */
enum ActivityStatus: string
{
    case DRAFT = 'draft';           // 草稿
    case PUBLISHED = 'published';   // 已发布
    case ACTIVE = 'active';         // 进行中
    case ENDED = 'ended';           // 已结束
    case CANCELLED = 'cancelled';   // 已取消

    public function label(): string
    {
        return match ($this) {
            self::DRAFT => '草稿',
            self::PUBLISHED => '已发布',
            self::ACTIVE => '进行中',
            self::ENDED => '已结束',
            self::CANCELLED => '已取消',
        };
    }
}
