public function setReply()
{
$timestamp = time();
if ($this->parentId == null || $this->parentId == '') {
$this->setAttribute('head', $timestamp . '-' . $this->id);
} elseif ($this->parentId !== $this->id) {
$parent = static::find($this->parentId);
if ($parent === null) {
throw new ParentDocumentNotFoundException();
}
$this->setAttribute('reply', $this->getReplyChar($parent));
$this->setAttribute('head', $parent->head);
}
$this->setAttribute('listOrder', $this->head . (isset($this->reply) ? $this->reply : ''));
}