diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php new file mode 100644 index 000000000..226a78634 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php @@ -0,0 +1,367 @@ +comment = new CommentEmbeddable(); + $this->persons = new ArrayCollection(); + $this->nonProfessionals = new ArrayCollection(); + $this->professionals = new ArrayCollection(); + $this->invites = new ArrayCollection(); + } + + + public function getId(): ?int + { + return $this->id; + } + + public function getSendSMS(): ?bool + { + return $this->sendSMS; + } + + public function setSendSMS(?bool $sendSMS): self + { + $this->sendSMS = $sendSMS; + + return $this; + } + + public function getComment(): CommentEmbeddable + { + return $this->comment; + } + + public function setComment(CommentEmbeddable $comment): self + { + $this->comment = $comment; + + return $this; + } + + public function getStartDate(): ?\DateTimeImmutable + { + return $this->startDate; + } + + public function setStartDate(\DateTimeImmutable $startDate): self + { + $this->startDate = $startDate; + + return $this; + } + + public function getEndDate(): ?\DateTimeImmutable + { + return $this->endDate; + } + + public function setEndDate(\DateTimeImmutable $endDate): self + { + $this->endDate = $endDate; + + return $this; + } + + public function getStatus(): ?string + { + return $this->status; + } + + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + public function getUser(): ?User + { + return $this->user; + } + + public function setUser(?User $user): self + { + $this->user = $user; + + return $this; + } + + public function getAccompanyingPeriod(): ?AccompanyingPeriod + { + return $this->accompanyingPeriod; + } + + public function setAccompanyingPeriod(?AccompanyingPeriod $accompanyingPeriod): self + { + $this->accompanyingPeriod = $accompanyingPeriod; + + return $this; + } + + public function getMainUser(): ?User + { + return $this->mainUser; + } + + public function setMainUser(?User $mainUser): self + { + $this->mainUser = $mainUser; + + return $this; + } + + /** + * @return Collection|Person[] + */ + public function getPersons(): Collection + { + return $this->persons; + } + + public function addPerson(Person $person): self + { + if (!$this->persons->contains($person)) { + $this->persons[] = $person; + } + + return $this; + } + + public function removePerson(Person $person): self + { + $this->persons->removeElement($person); + + 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[] + */ + public function getProfessionals(): Collection + { + return $this->professionals; + } + + public function addProfessional(ThirdParty $professional): self + { + if (!$this->professionals->contains($professional)) { + $this->professionals[] = $professional; + } + + return $this; + } + + public function removeProfessional(ThirdParty $professional): self + { + $this->professionals->removeElement($professional); + + return $this; + } + + /** + * @return Collection|Invite[] + */ + public function getInvites(): Collection + { + return $this->invites; + } + + public function addInvite(Invite $invite): self + { + if (!$this->invites->contains($invite)) { + $this->invites[] = $invite; + } + + return $this; + } + + public function removeInvite(Invite $invite): self + { + $this->invites->removeElement($invite); + + return $this; + } + + public function getCancelReason(): ?CancelReason + { + return $this->cancelReason; + } + + public function setCancelReason(?CancelReason $cancelReason): self + { + $this->cancelReason = $cancelReason; + + return $this; + } + + public function getCalendarRange(): ?CalendarRange + { + return $this->calendarRange; + } + + public function setCalendarRange(?CalendarRange $calendarRange): self + { + $this->calendarRange = $calendarRange; + + return $this; + } + + public function getActivity(): ?Activity + { + return $this->activity; + } + + public function setActivity(?Activity $activity): self + { + $this->activity = $activity; + + return $this; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php b/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php new file mode 100644 index 000000000..62c1e943f --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php @@ -0,0 +1,81 @@ +id; + } + + public function getStartDate(): ?\DateTimeImmutable + { + return $this->startDate; + } + + public function setStartDate(\DateTimeImmutable $startDate): self + { + $this->startDate = $startDate; + + return $this; + } + + public function getEndDate(): ?\DateTimeImmutable + { + return $this->endDate; + } + + public function setEndDate(\DateTimeImmutable $endDate): self + { + $this->endDate = $endDate; + + return $this; + } + + public function getUser(): ?User + { + return $this->user; + } + + public function setUser(?User $user): self + { + $this->user = $user; + + return $this; + } + + +} diff --git a/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php new file mode 100644 index 000000000..dacb2fd5e --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Entity/CancelReason.php @@ -0,0 +1,76 @@ +id; + } + + public function getActive(): ?bool + { + return $this->active; + } + + public function setActive(bool $active): self + { + $this->active = $active; + + return $this; + } + + public function getCanceledBy(): ?string + { + return $this->canceledBy; + } + + public function setCanceledBy(string $canceledBy): self + { + $this->canceledBy = $canceledBy; + + return $this; + } + + public function getName(): ?array + { + return $this->name; + } + + public function setName(array $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Entity/Invite.php b/src/Bundle/ChillCalendarBundle/Entity/Invite.php new file mode 100644 index 000000000..b8ff4f1f5 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Entity/Invite.php @@ -0,0 +1,60 @@ +id; + } + + public function getStatus(): ?string + { + return $this->status; + } + + public function setStatus(string $status): self + { + $this->status = $status; + + return $this; + } + + public function getUser(): ?User + { + return $this->user; + } + + public function setUser(?User $user): self + { + $this->user = $user; + + return $this; + } +} diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php new file mode 100644 index 000000000..a2c542436 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('c.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?CalendarRange + { + return $this->createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php new file mode 100644 index 000000000..4f99c6d8e --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('c.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Calendar + { + return $this->createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php new file mode 100644 index 000000000..11c2f7f59 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Repository/CancelReasonRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('c.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?CancelReason + { + return $this->createQueryBuilder('c') + ->andWhere('c.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php new file mode 100644 index 000000000..da9207cc4 --- /dev/null +++ b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('i') + ->andWhere('i.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('i.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Invite + { + return $this->createQueryBuilder('i') + ->andWhere('i.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +}