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\CalendarBundle\Entity;
use Chill\ActivityBundle\Entity\Activity;
use Chill\CalendarBundle\Repository\CalendarRepository;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
@@ -71,10 +72,10 @@ class Calendar
private CommentEmbeddable $comment;
/**
* @ORM\Embedded(class=CommentEmbeddable::class, columnPrefix="prcomment_")
* @ORM\Embedded(class=PrivateCommentEmbeddable::class, columnPrefix="privateComment_")
* @Serializer\Groups({"calendar:read"})
*/
private CommentEmbeddable $privateComment;
private PrivateCommentEmbeddable $privateComment;
/**
* @ORM\Column(type="datetimetz_immutable")
@@ -157,7 +158,7 @@ class Calendar
public function __construct()
{
$this->comment = new CommentEmbeddable();
$this->privateComment = new CommentEmbeddable();
$this->privateComment = new PrivateCommentEmbeddable();
$this->persons = new ArrayCollection();
$this->professionals = new ArrayCollection();
$this->invites = new ArrayCollection();
@@ -215,7 +216,7 @@ class Calendar
return $this->comment;
}
public function getPrivateComment(): CommentEmbeddable
public function getPrivateComment(): PrivateCommentEmbeddable
{
return $this->privateComment;
}
@@ -398,7 +399,7 @@ class Calendar
return $this;
}
public function setPrivateComment(CommentEmbeddable $privateComment): self
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
{
$this->privateComment = $privateComment;