<?php

namespace CliqThemes\ORM\Form;

/**
 * Contract describing how field values should be persisted and retrieved.
 */
interface StorageStrategy
{
    /**
     * Persist or update the provided value for the given field and model.
     */
    public function saveOrUpdate(int $modelId, string $field, mixed $value): void;

    /**
     * Retrieve the stored value for the given field and model identifier.
     */
    public function get(int $modelId, string $field): mixed;

    /**
     * Remove the stored value for the given field and model identifier.
     */
    public function delete(int $modelId, string $field): void;
}
