<?php

namespace App\Repositories\Eloquent;

use App\Models\BookingAttachment;
use App\Repositories\Interfaces\BookingAttachmentRepositoryInterface;

class BookingAttachmentRepository extends BaseRepository implements BookingAttachmentRepositoryInterface
{
    public function __construct(BookingAttachment $model) { parent::__construct($model); }

    public function mapRequestAttachmentsToBooking(int $requestId, int $bookingId): int
    {
        return $this->model->where('instant_booking_request_id', $requestId)->update(['booking_id' => $bookingId]);
    }
}
