<?php

namespace App\Enums;

enum UserAccessLevel: string
{
    case CUSTOMER = 'customer';
    case STAFF = 'staff';
    case TENANT_OWNER = 'tenant_owner';
    case MASTER_ADMIN = 'master_admin';

    public function rank(): int
    {
        return match ($this) {
            self::CUSTOMER => 1,
            self::STAFF => 2,
            self::TENANT_OWNER => 3,
            self::MASTER_ADMIN => 4,
        };
    }
}
