<?php

declare(strict_types=1);

namespace Kylin\Education\Enums;

/**
 * 答题状态
 */
enum AttemptStatus: string
{
    case IN_PROGRESS = 'in_progress';   // 答题中
    case SUBMITTED = 'submitted';       // 已提交
    case GRADED = 'graded';             // 已阅卷

    public function label(): string
    {
        return match ($this) {
            self::IN_PROGRESS => '答题中',
            self::SUBMITTED => '已提交',
            self::GRADED => '已阅卷',
        };
    }
}
