/**
  * Post constructor.
  *
  * @param $postId
  */
 public function __construct($Id, UserId $author, $content, \DateTime $Date, EVisibility $Visibility, EPostType $PostType, $Comments = [], $Attachments = null, $isEdited = false)
 {
     $this->Id = $Id;
     $this->Date = $Date;
     $this->Visibility = $Visibility;
     $this->Attachments = $Attachments;
     $this->Comments = $Comments;
     $this->isEdited = $isEdited;
     $this->author = $author;
     $this->postType = $PostType;
     $this->Content = $content;
     $scr = [];
     $types = EScoreType::keys();
     foreach ($types as $type) {
         $scr[$type] = [];
         $s = ScoreService::getScoresByElem(EScoreElem::post(), $Id);
         foreach ($s as $scor) {
             if ($scor->getScoreType() == EScoreType::$type()) {
                 $scr[$type][] = $scor;
             }
         }
     }
     $this->scores = $scr;
 }