<?php

declare(strict_types=1);

namespace Kylin\Education\Enums;

/**
 * 考试状态
 */
enum ExamStatus: string
{
    case DRAFT = 'draft';                   // 草稿
    case PUBLISHED = 'published';           // 已发布
    case IN_PROGRESS = 'in_progress';       // 进行中
    case ENDED = 'ended';                   // 已结束
    case GRADED = 'graded';                 // 已阅卷

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