PrivateCommentEmbeddable created and added to entities + datamapper

This commit is contained in:
2022-04-26 20:21:33 +02:00
parent 64b5de2c03
commit 37a198b860
8 changed files with 167 additions and 32 deletions

View File

@@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
@@ -136,10 +137,10 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private string $note = '';
/**
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="prcomment_")
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable", columnPrefix="privateComment_")
* @Serializer\Groups({"read", "accompanying_period_work:edit", "docgen:read"})
*/
private CommentEmbeddable $privateComment;
private PrivateCommentEmbeddable $privateComment;
/**
* @ORM\ManyToMany(targetEntity=Person::class)
@@ -209,7 +210,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
public function __construct()
{
$this->goals = new ArrayCollection();
$this->privateComment = new CommentEmbeddable();
$this->privateComment = new PrivateCommentEmbeddable();
$this->results = new ArrayCollection();
$this->thirdParties = new ArrayCollection();
$this->persons = new ArrayCollection();
@@ -331,7 +332,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this->note;
}
public function getPrivateComment(): CommentEmbeddable
public function getPrivateComment(): PrivateCommentEmbeddable
{
return $this->privateComment;
}
@@ -518,7 +519,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function setPrivateComment(CommentEmbeddable $privateComment): self
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
{
$this->privateComment = $privateComment;