Add private comment to rendez-vous

This commit is contained in:
2022-04-25 15:47:51 +02:00
parent 79fa030323
commit 171cc79a4a
6 changed files with 68 additions and 1 deletions

View File

@@ -70,6 +70,12 @@ class Calendar
*/
private CommentEmbeddable $comment;
/**
* @ORM\Embedded(class=CommentEmbeddable::class, columnPrefix="prcomment_")
* @Serializer\Groups({"calendar:read"})
*/
private CommentEmbeddable $privateComment;
/**
* @ORM\Column(type="datetimetz_immutable")
* @Serializer\Groups({"calendar:read"})
@@ -151,6 +157,7 @@ class Calendar
public function __construct()
{
$this->comment = new CommentEmbeddable();
$this->privateComment = new CommentEmbeddable();
$this->persons = new ArrayCollection();
$this->professionals = new ArrayCollection();
$this->invites = new ArrayCollection();
@@ -208,6 +215,11 @@ class Calendar
return $this->comment;
}
public function getPrivateComment(): CommentEmbeddable
{
return $this->privateComment;
}
public function getEndDate(): ?DateTimeImmutable
{
return $this->endDate;
@@ -386,6 +398,13 @@ class Calendar
return $this;
}
public function setPrivateComment(CommentEmbeddable $privateComment): self
{
$this->privateComment = $privateComment;
return $this;
}
public function setEndDate(DateTimeImmutable $endDate): self
{
$this->endDate = $endDate;