public function createFromObject(RevisionableInterface $obj)
    {
        $prevRev = $this->lastObjectRevision($obj);

        $this->setTargetType($obj->objType());
        $this->setTargetId($obj->id());
        $this->setRevNum($prevRev->revNum() + 1);
        $this->setRevTs('now');

        if (is_callable([$obj, 'lastModifiedBy'])) {
            $this->setRevUser($obj->lastModifiedBy());
        }

        $this->setDataObj($obj->data());
        $this->setDataPrev($prevRev->dataObj());

        $diff = $this->createDiff();
        $this->setDataDiff($diff);

        return $this;
    }