mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
rdv: adapt calendar entities: drop useless field and change field type
This commit is contained in:
@@ -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[]
|
||||
*/
|
||||
|
Reference in New Issue
Block a user