<?php

declare(strict_types=1);

namespace App\Modules\Tenants\Models;

class TenantUser
{
    /**
     * @param array<int, string> $roles
     */
    public function __construct(
        public readonly string $tenantId,
        public readonly string $userId,
        public readonly string $status,
        public readonly array $roles = [],
    ) {
    }

    public function canAccessTenant(): bool
    {
        return $this->status === 'active';
    }
}
