<?php

declare(strict_types=1);

namespace Kylin\Agriculture\Enums;

/**
 * 传感器状态枚举
 */
enum SensorStatus: string
{
    case ONLINE = 'online';
    case OFFLINE = 'offline';
    case ALARM = 'alarm';

    public function label(): string
    {
        return match ($this) {
            self::ONLINE => '在线',
            self::OFFLINE => '离线',
            self::ALARM => '告警',
        };
    }
}
