replace comment by commentEmbeddable

This commit is contained in:
2021-06-15 10:17:53 +02:00
parent f827e50431
commit efdfd10e49
6 changed files with 132 additions and 30 deletions

View File

@@ -10,6 +10,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
use Chill\MainBundle\Entity\Address;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Validator\Constraints\Household\MaxHolder;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
/**
* @ORM\Entity
@@ -52,9 +53,9 @@ class Household
private Collection $members;
/**
* @ORM\Column(type="text", name="comment_members", options={"default": ""})
* @ORM\Embedded(class=CommentEmbeddable::class, columnPrefix="comment_members_")
*/
private string $commentMembers = "";
private CommentEmbeddable $commentMembers;
/**
* @ORM\Column(type="boolean", name="waiting_for_birth", options={"default": false})
@@ -70,6 +71,7 @@ class Household
{
$this->addresses = new ArrayCollection();
$this->members = new ArrayCollection();
$this->commentMembers = new CommentEmbeddable();
}
public function getId(): ?int
@@ -221,12 +223,12 @@ class Household
return $this;
}
public function getCommentMembers(): ?string
public function getCommentMembers(): CommentEmbeddable
{
return $this->commentMembers;
}
public function setCommentMembers(string $commentMembers): self
public function setCommentMembers(CommentEmbeddable $commentMembers): self
{
$this->commentMembers = $commentMembers;