<?php

namespace Kylin\Catering\Enums;

/**
 * 用户角色
 */
enum UserRole: string
{
    case Admin = 'admin';               // 超级管理员
    case Manager = 'manager';           // 店长
    case Waiter = 'waiter';             // 服务员
    case Kitchen = 'kitchen';           // 后厨
    case Warehouse = 'warehouse';       // 库管
    case Finance = 'finance';           // 财务

    public function label(): string
    {
        return match ($this) {
            self::Admin => '超级管理员',
            self::Manager => '店长',
            self::Waiter => '服务员',
            self::Kitchen => '后厨',
            self::Warehouse => '库管',
            self::Finance => '财务',
        };
    }
}
