<?php

declare(strict_types=1);

namespace Apexl\Io\User\Interfaces;

/**
 * Resolves the id written into `created_by` / `modified_by`.
 *
 * The default answer is the current user's id, and for most applications that is the
 * whole story. It is not universal: an application whose audit columns reference its own
 * people table — a `contacts` row rather than a `users` row — needs the id of that
 * record, and writing the user id there attributes the change to whichever unrelated row
 * happens to share the number.
 *
 * Returning null means "no human actor": a CLI run, an ETL import, a cron job, a test.
 * That is a value rather than an absence, so it is written as NULL rather than as 0 —
 * 0 is not a row anybody can look up, and a foreign key on the column rejects it.
 */
interface StampedActorResolverInterface
{
    public function id(): ?int;
}
