id; } public function hasId(): bool { return !empty($this->id); } public function isUpdate(): bool { return $this->hasId(); } public function isCreate(): bool { return !$this->hasId(); } }