<?php
declare(strict_types=1);

namespace App\Models;

use App\Core\Database;

final class Account
{
    public static function find(int $id, int $tenantId): ?array
    {
        return Database::instance()->fetch(
            "SELECT id, tenant_id, name, phone, email, status FROM accounts
             WHERE id = :id AND tenant_id = :tid AND deleted_at IS NULL AND status = 'active'",
            ['id' => $id, 'tid' => $tenantId]
        );
    }
}
