rdv: adapt calendar entities: drop useless field and change field type

This commit is contained in:
nobohan
2021-07-23 09:59:20 +02:00
parent de6df983a0
commit c54290a265
5 changed files with 53 additions and 43 deletions

View File

@@ -65,15 +65,6 @@ class Calendar
*/
private ?Collection $persons = null;
/**
*
* @ORM\ManyToMany(
* targetEntity="Chill\PersonBundle\Entity\Person",
* cascade={"persist", "remove", "merge", "detach"})
* @ORM\JoinTable(name="chill_calendar.calendar_to_non_professionals")
*/
private ?Collection $nonProfessionals = null;
/**
*
* @ORM\ManyToMany(
@@ -140,7 +131,6 @@ class Calendar
{
$this->comment = new CommentEmbeddable();
$this->persons = new ArrayCollection();
$this->nonProfessionals = new ArrayCollection();
$this->professionals = new ArrayCollection();
$this->invites = new ArrayCollection();
}
@@ -271,30 +261,6 @@ class Calendar
return $this;
}
/**
* @return Collection|Person[]
*/
public function getNonProfessionals(): Collection
{
return $this->nonProfessionals;
}
public function addNonProfessional(Person $nonProfessional): self
{
if (!$this->nonProfessionals->contains($nonProfessional)) {
$this->nonProfessionals[] = $nonProfessional;
}
return $this;
}
public function removeNonProfessional(Person $nonProfessional): self
{
$this->nonProfessionals->removeElement($nonProfessional);
return $this;
}
/**
* @return Collection|ThirdParty[]
*/