Create (POST /time-logs) or sparsely update (PUT /time-logs/{id}) a task
time log.
DURATION. hours/minutes are ONE figure in two fields and travel as a
pair: both set is an explicit duration, neither set derives it from the
started_at–ended_at range, and exactly one is a 422 rather than a silent
zero for the missing half — the same rule the task modal's
{@see \App\Tenant\Project\Requests\UpsertProjectTaskTimeLogRequest} enforces,
because hours: null, minutes: 45 next to a three-hour block used to store
0h45m.
RANGE. A placement is stored as a PAIR or not at all: half of one would leave
the other end of an existing log in place and could invert it. started_at
and ended_at are tenant WALL time and are accepted in both wire forms — an
ISO-8601 instant (offset or Z) and the naive Y-m-d H:i:s string — through
{@see \App\Tenant\Project\Support\TimeLogWallTime}. Whether a range OVERLAPS
another log of the same author is NOT decided here: that invariant needs a
lock and a transaction, which a validator has neither of, so it lives in
{@see \App\Tenant\Project\Services\ProjectTaskTimeLogService}.
source IS NOT A FIELD and never will be — it records how a log was written,
so it is the write path's decision, never the client's. invoice_id and
invoiced_at are likewise absent: billing a log is the invoice endpoint's
act. The closed body turns any of them into an explicit rejection.
tag_ids is shape-checked here and OWNERSHIP-checked in the application
service, after the project is authorized. Validating "does this tag belong to
- the project" at this layer would answer 422 for a foreign tag and 404 for the
project — a caller with no access could enumerate another project's tag ids
one at a time.