<?php

declare(strict_types=1);

namespace Kylin\Education\Enums;

/**
 * 学籍状态
 */
enum StudentStatus: string
{
    case ACTIVE = 'active';         // 在读
    case SUSPENDED = 'suspended';   // 休学
    case WITHDRAWN = 'withdrawn';   // 退学
    case GRADUATED = 'graduated';   // 毕业

    public function label(): string
    {
        return match ($this) {
            self::ACTIVE => '在读',
            self::SUSPENDED => '休学',
            self::WITHDRAWN => '退学',
            self::GRADUATED => '毕业',
        };
    }

    public function badgeClass(): string
    {
        return match ($this) {
            self::ACTIVE => 'bg-success',
            self::SUSPENDED => 'bg-warning',
            self::WITHDRAWN => 'bg-danger',
            self::GRADUATED => 'bg-info',
        };
    }
}
