<?php

namespace Models;

class OrderbookTransferModel
{
    private OrderbookModel $orderbookModel;

    public function __construct()
    {
        $this->orderbookModel = new OrderbookModel();
    }

    public function getByTokenExternalId(string $tokenExternalId): ?array
    {
        return $this->orderbookModel->findByTokenExternalId($tokenExternalId);
    }

    public function markCompleted(int $orderbookId): void
    {
        $this->orderbookModel->updateStatus($orderbookId, OrderbookModel::STATUS_COMPLETED);
    }
}
