<?php

namespace Modules\Vrc\Services\Contracts;

/**
 * VRC ↔ ERP media boundary. Inspection photos, signatures and vehicle
 * documents are stored through the ERP media module (App\Media), so VRC never
 * builds a parallel attachments store (spec §3.3 / §5.4). SmartStorage swaps
 * the underlying disk transparently.
 */
interface MediaServiceContract
{
    /**
     * Upload files from the request and attach them to a model.
     *
     * @param  \Illuminate\Database\Eloquent\Model  $model
     * @param  string  $inputName  the request file/array field name
     */
    public function upload(int $businessId, $model, $request, string $inputName, bool $isSingle = false): void;

    /** Persist a base64 image (e.g. a signature pad) and return its stored path. */
    public function storeBase64(string $base64): ?string;
}
