<?php

namespace Kylin\Property\Enums;

/**
 * 维修类型枚举
 */
enum RepairType: string
{
    case WATER = 'water';
    case ELECTRIC = 'electric';
    case DOOR_WINDOW = 'door_window';
    case ELEVATOR = 'elevator';
    case PUBLIC_FACILITY = 'public_facility';
    case OTHER = 'other';

    public function label(): string
    {
        return match ($this) {
            self::WATER => '水管漏水',
            self::ELECTRIC => '电路故障',
            self::DOOR_WINDOW => '门窗损坏',
            self::ELEVATOR => '电梯故障',
            self::PUBLIC_FACILITY => '公共设施',
            self::OTHER => '其他',
        };
    }
}
