Change accompanyingCourse Resources comment by a string

This commit is contained in:
2022-01-04 14:37:16 +01:00
parent 72a15bb823
commit af2eca0d03
2 changed files with 41 additions and 5 deletions

View File

@@ -44,9 +44,10 @@ class Resource
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @ORM\ManyToOne(targetEntity=Comment::class)
* @ORM\Column(type="text", nullable=true)
* @Groups({"read", "write"})
*/
private $comment;
private string $comment = '';
/**
* @ORM\Id
@@ -75,7 +76,7 @@ class Resource
return $this->accompanyingPeriod;
}
public function getComment(): ?Comment
public function getComment(): ?string
{
return $this->comment;
}
@@ -111,9 +112,9 @@ class Resource
return $this;
}
public function setComment(?Comment $comment): self
public function setComment(?string $comment = null): self
{
$this->comment = $comment;
$this->comment = (string) $comment;
return $this;
}