<?php

namespace App\Enums;

enum AppOperation: string
{
    case INSTALL = 'install';
    case UNINSTALL = 'uninstall';
    case ENABLE = 'enable';
    case DISABLE = 'disable';
    case UPGRADE = 'upgrade';
    case EXPORT = 'export';

    public function label(): string
    {
        return match ($this) {
            self::INSTALL => '安装',
            self::UNINSTALL => '卸载',
            self::ENABLE => '启用',
            self::DISABLE => '禁用',
            self::UPGRADE => '升级',
            self::EXPORT => '导出',
        };
    }
}
