private comment for action. still needs (de)normalization

This commit is contained in:
2022-04-26 09:52:00 +02:00
parent 171cc79a4a
commit 064286aa2f
3 changed files with 64 additions and 0 deletions

View File

@@ -13,6 +13,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\User;
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
@@ -134,6 +135,12 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
*/
private string $note = '';
/**
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="prcomment_")
* @Serializer\Groups({"read", "accompanying_period_work:edit", "docgen:read"})
*/
private CommentEmbeddable $privateComment;
/**
* @ORM\ManyToMany(targetEntity=Person::class)
* @ORM\JoinTable(name="chill_person_accompanying_period_work_person")
@@ -202,6 +209,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
public function __construct()
{
$this->goals = new ArrayCollection();
$this->privateComment = new CommentEmbeddable();
$this->results = new ArrayCollection();
$this->thirdParties = new ArrayCollection();
$this->persons = new ArrayCollection();
@@ -323,6 +331,11 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this->note;
}
public function getPrivateComment(): CommentEmbeddable
{
return $this->privateComment;
}
public function getPersons(): Collection
{
return $this->persons;
@@ -505,6 +518,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function setPrivateComment(CommentEmbeddable $privateComment): self
{
$this->privateComment = $privateComment;
return $this;
}
public function setSocialAction(?SocialAction $socialAction): self
{
$this->socialAction = $socialAction;