mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43: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[]
|
||||
*/
|
||||
|
@@ -11,6 +11,11 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
*/
|
||||
class CancelReason
|
||||
{
|
||||
|
||||
const CANCELEDBY_USER = 'CANCELEDBY_USER';
|
||||
const CANCELEDBY_PERSON = 'CANCELEDBY_PERSON';
|
||||
const CANCELEDBY_DONOTCOUNT = 'CANCELEDBY_DONOTCOUNT';
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
@@ -24,7 +29,7 @@ class CancelReason
|
||||
private $active;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json_array")
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
private $canceledBy;
|
||||
|
||||
@@ -50,12 +55,12 @@ class CancelReason
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCanceledBy(): ?array
|
||||
public function getCanceledBy(): ?string
|
||||
{
|
||||
return $this->canceledBy;
|
||||
}
|
||||
|
||||
public function setCanceledBy(array $canceledBy): self
|
||||
public function setCanceledBy(string $canceledBy): self
|
||||
{
|
||||
$this->canceledBy = $canceledBy;
|
||||
|
||||
|
Reference in New Issue
Block a user