<?php

declare(strict_types=1);

namespace Plugin\tnt_mcp\src\Mcp\Action;

/**
 * How to learn the primary key a create just produced, given that the controllers hand it back
 * into a property rather than into their response. `lastInsertId` is only correct when the
 * controller's last insert is the row we care about; controllers that write child tables
 * afterwards need `maxIdDelta` (snapshot `MAX(key)` before, take the new maximum after), which is
 * exact under the invoker's exclusive transaction.
 *
 * String-backed so a YAML `idResolution.mode:` value maps straight onto a case.
 */
enum IdResolutionMode: string
{
    case LastInsertId = 'lastInsertId';
    case MaxIdDelta   = 'maxIdDelta';
}
