File manager - Edit - /home/premiey/www/wp-includes/images/media/Entity.tar
Back
Zoom/ZoomMeeting.php 0000666 00000002664 15165376126 0010466 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Zoom; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Url; /** * Class ZoomMeeting * * @package AmeliaBooking\Domain\Entity\Zoom */ class ZoomMeeting { /** @var Id */ private $id; /** @var Url */ private $joinUrl; /** @var Url */ private $startUrl; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Url */ public function getJoinUrl() { return $this->joinUrl; } /** * @param Url $joinUrl */ public function setJoinUrl(Url $joinUrl) { $this->joinUrl = $joinUrl; } /** * @return Url */ public function getStartUrl() { return $this->startUrl; } /** * @param Url $startUrl */ public function setStartUrl(Url $startUrl) { $this->startUrl = $startUrl; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'startUrl' => $this->getStartUrl() ? $this->getStartUrl()->getValue() : null, 'joinUrl' => $this->getJoinUrl() ? $this->getJoinUrl()->getValue() : null, ]; } } Notification/NotificationLog.php 0000666 00000007776 15165376126 0013034 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Notification; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class NotificationLog * * @package AmeliaBooking\Domain\Entity\Notification */ class NotificationLog { /** @var Id */ private $id; /** @var Id */ private $notificationsId; /** @var Id */ private $userId; /** @var Id */ private $appointmentId; /** @var Id */ private $eventId; /** @var Id */ private $packageCustomerId; /** @var DateTimeValue */ private $sentDateTime; /** @var BooleanValueObject */ private $sent; /** @var Json */ private $data; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getNotificationsId() { return $this->notificationsId; } /** * @param Id $notificationsId */ public function setNotificationsId($notificationsId) { $this->notificationsId = $notificationsId; } /** * @return Id */ public function getUserId() { return $this->userId; } /** * @param Id $userId */ public function setUserId($userId) { $this->userId = $userId; } /** * @return Id */ public function getAppointmentId() { return $this->appointmentId; } /** * @param Id $appointmentId */ public function setAppointmentId($appointmentId) { $this->appointmentId = $appointmentId; } /** * @return Id */ public function getEventId() { return $this->eventId; } /** * @param Id $eventId */ public function setEventId($eventId) { $this->eventId = $eventId; } /** * @return Id */ public function getPackageCustomerId() { return $this->packageCustomerId; } /** * @param Id $packageCustomerId */ public function setPackageCustomerId($packageCustomerId) { $this->packageCustomerId = $packageCustomerId; } /** * @return DateTimeValue */ public function getSentDateTime() { return $this->sentDateTime; } /** * @param DateTimeValue $sentDateTime */ public function setSentDateTime($sentDateTime) { $this->sentDateTime = $sentDateTime; } /** * @return BooleanValueObject */ public function getSent() { return $this->sent; } /** * @param BooleanValueObject $sent */ public function setSent($sent) { $this->sent = $sent; } /** * @return Json */ public function getData() { return $this->data; } /** * @param Json $data */ public function setData($data) { $this->data = $data; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'notificationId' => $this->getNotificationsId()->getValue(), 'userId' => $this->getUserId()->getValue(), 'appointmentId' => $this->getAppointmentId() ? $this->getAppointmentId()->getValue() : null, 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null, 'packageCustomerId' => $this->getPackageCustomerId() ? $this->getPackageCustomerId()->getValue() : null, 'sentDateTime' => $this->getSentDateTime()->getValue(), 'sent' => $this->getSent() ? $this->getSent()->getValue() : null, 'data' => $this->getData() ? $this->getData()->getValue() : null, ]; } } Notification/Notification.php 0000666 00000017512 15165376126 0012357 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Notification; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\TimeOfDay; use AmeliaBooking\Domain\ValueObjects\Duration; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\BookingType; use AmeliaBooking\Domain\ValueObjects\String\Html; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\NotificationSendTo; use AmeliaBooking\Domain\ValueObjects\String\NotificationStatus; use AmeliaBooking\Domain\ValueObjects\String\NotificationType; /** * Class Notification * * @package AmeliaBooking\Domain\Entity\Notification */ class Notification { /** @var Id */ private $id; /** @var Name */ private $name; /** @var string */ private $customName; /** @var NotificationStatus */ private $status; /** @var TimeOfDay */ private $time; /** @var Duration */ private $timeBefore; /** @var Duration */ private $timeAfter; /** @var NotificationType */ private $type; /** @var NotificationSendTo */ private $sendTo; /** @var Name */ private $subject; /** @var Html */ private $content; /** @var BookingType */ private $entity; /** @var Json */ private $translations; /** @var array */ private $entityIds; /** @var BooleanValueObject */ private $sendOnlyMe; /** @var string */ private $whatsAppTemplate; /** * Notification constructor. * * @param Name $name * @param NotificationStatus $status * @param NotificationType $type * @param BookingType $entity * @param NotificationSendTo $sendTo * @param Name $subject * @param Html $content */ public function __construct( Name $name, NotificationStatus $status, NotificationType $type, BookingType $entity, NotificationSendTo $sendTo, Name $subject, Html $content ) { $this->name = $name; $this->status = $status; $this->type = $type; $this->entity = $entity; $this->sendTo = $sendTo; $this->subject = $subject; $this->content = $content; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return string */ public function getCustomName() { return $this->customName; } /** * @param string $customName */ public function setCustomName($customName) { $this->customName = $customName; } /** * @return NotificationStatus */ public function getStatus() { return $this->status; } /** * @param NotificationStatus $status */ public function setStatus(NotificationStatus $status) { $this->status = $status; } /** * @return NotificationType */ public function getType() { return $this->type; } /** * @param NotificationType $type */ public function setType(NotificationType $type) { $this->type = $type; } /** * @return BookingType */ public function getEntity() { return $this->entity; } /** * @param BookingType $entity */ public function setEntity(BookingType $entity) { $this->entity = $entity; } /** * @return TimeOfDay */ public function getTime() { return $this->time; } /** * @param TimeOfDay $time */ public function setTime($time) { $this->time = $time; } /** * @return Duration */ public function getTimeBefore() { return $this->timeBefore; } /** * @param Duration $timeBefore */ public function setTimeBefore($timeBefore) { $this->timeBefore = $timeBefore; } /** * @return Duration */ public function getTimeAfter() { return $this->timeAfter; } /** * @param Duration $timeAfter */ public function setTimeAfter($timeAfter) { $this->timeAfter = $timeAfter; } /** * @return NotificationSendTo */ public function getSendTo() { return $this->sendTo; } /** * @param NotificationSendTo $sendTo */ public function setSendTo(NotificationSendTo $sendTo) { $this->sendTo = $sendTo; } /** * @return Name */ public function getSubject() { return $this->subject; } /** * @param Name $subject */ public function setSubject(Name $subject) { $this->subject = $subject; } /** * @return Html */ public function getContent() { return $this->content; } /** * @param Html $content */ public function setContent(Html $content) { $this->content = $content; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function getEntityIds() { return $this->entityIds; } /** * @param array $entityIds */ public function setEntityIds($entityIds) { $this->entityIds = $entityIds; } /** * @return BooleanValueObject */ public function getSendOnlyMe() { return $this->sendOnlyMe; } /** * @param BooleanValueObject $sendOnlyMe */ public function setSendOnlyMe($sendOnlyMe) { $this->sendOnlyMe = $sendOnlyMe; } /** * @return string */ public function getWhatsAppTemplate() { return $this->whatsAppTemplate; } /** * @param string $whatsAppTemplate */ public function setWhatsAppTemplate($whatsAppTemplate) { $this->whatsAppTemplate = $whatsAppTemplate; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'name' => $this->getName()->getValue(), 'customName' => $this->getCustomName(), 'status' => $this->getStatus()->getValue(), 'type' => $this->getType()->getValue(), 'entity' => $this->getEntity()->getValue(), 'time' => null !== $this->getTime() ? $this->getTime()->getValue() : null, 'timeBefore' => null !== $this->getTimeBefore() ? $this->getTimeBefore()->getValue() : null, 'timeAfter' => null !== $this->getTimeAfter() ? $this->getTimeAfter()->getValue() : null, 'sendTo' => $this->getSendTo()->getValue(), 'subject' => $this->getSubject()->getValue(), 'content' => $this->getContent()->getValue(), 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, 'entityIds' => $this->getEntityIds(), 'sendOnlyMe' => $this->getSendOnlyMe() ? $this->getSendOnlyMe()->getValue() : null, 'whatsAppTemplate' => $this->getWhatsAppTemplate() ?: null, ]; } } Schedule/DayOff.php 0000666 00000005563 15165376126 0010212 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\DateRepeat; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class DayOff * * @package AmeliaBooking\Domain\Entity\Schedule */ class DayOff { /** @var Id */ private $id; /** @var Name */ private $name; /** @var DateTimeValue */ private $startDate; /** @var DateTimeValue */ private $endDate; /** @var DateRepeat */ private $repeat; /** * DayOff constructor. * * @param Name $name * @param DateTimeValue $startDate * @param DateTimeValue $endDate * @param DateRepeat $repeat */ public function __construct( Name $name, DateTimeValue $startDate, DateTimeValue $endDate, DateRepeat $repeat ) { $this->name = $name; $this->startDate = $startDate; $this->endDate = $endDate; $this->repeat = $repeat; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return DateTimeValue */ public function getStartDate() { return $this->startDate; } /** * @param DateTimeValue $startDate */ public function setStartDate(DateTimeValue $startDate) { $this->startDate = $startDate; } /** * @return DateTimeValue */ public function getEndDate() { return $this->endDate; } /** * @param DateTimeValue $endDate */ public function setEndDate(DateTimeValue $endDate) { $this->endDate = $endDate; } /** * @return DateRepeat */ public function getRepeat() { return $this->repeat; } /** * @param DateRepeat $repeat */ public function setRepeat(DateRepeat $repeat) { $this->repeat = $repeat; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->id ? $this->id->getValue() : null, 'name' => $this->name->getValue(), 'startDate' => $this->startDate->getValue()->format('Y-m-d'), 'endDate' => $this->endDate->getValue()->format('Y-m-d'), 'repeat' => $this->repeat->getValue(), ]; } } Schedule/PeriodLocation.php 0000666 00000002433 15165376126 0011746 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class PeriodLocation * * @package AmeliaBooking\Domain\Entity\Schedule */ class PeriodLocation { /** @var Id */ private $id; /** @var Id */ private $locationId; /** * PeriodLocation constructor. * * @param Id $locationId */ public function __construct( Id $locationId ) { $this->locationId = $locationId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'locationId' => $this->locationId->getValue(), ]; } } Schedule/TimeOut.php 0000666 00000003650 15165376126 0010423 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; /** * Class TimeOut * * @package AmeliaBooking\Domain\Entity\Schedule */ class TimeOut { /** @var Id */ private $id; /** @var DateTimeValue */ private $startTime; /** @var DateTimeValue */ private $endTime; /** * TimeOut constructor. * * @param DateTimeValue $startTime * @param DateTimeValue $endTime */ public function __construct( DateTimeValue $startTime, DateTimeValue $endTime ) { $this->startTime = $startTime; $this->endTime = $endTime; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return DateTimeValue */ public function getStartTime() { return $this->startTime; } /** * @param DateTimeValue $startTime */ public function setStartTime(DateTimeValue $startTime) { $this->startTime = $startTime; } /** * @return DateTimeValue */ public function getEndTime() { return $this->endTime; } /** * @param DateTimeValue $endTime */ public function setEndTime(DateTimeValue $endTime) { $this->endTime = $endTime; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'startTime' => $this->startTime->getValue()->format('H:i:s'), 'endTime' => $this->endTime->getValue()->format('H:i:s'), ]; } } Schedule/SpecialDayPeriod.php 0000666 00000007334 15165376126 0012221 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class SpecialDayPeriod * * @package AmeliaBooking\Domain\Entity\Schedule */ class SpecialDayPeriod { /** @var Id */ private $id; /** @var DateTimeValue */ private $startTime; /** @var DateTimeValue */ private $endTime; /** @var Id */ private $locationId; /** @var Collection */ private $periodServiceList; /** @var Collection */ private $periodLocationList; /** * SpecialDayPeriod constructor. * * @param DateTimeValue $startTime * @param DateTimeValue $endTime * @param Collection $periodServiceList * @param Collection $periodLocationList */ public function __construct( DateTimeValue $startTime, DateTimeValue $endTime, Collection $periodServiceList, Collection $periodLocationList ) { $this->startTime = $startTime; $this->endTime = $endTime; $this->periodServiceList = $periodServiceList; $this->periodLocationList = $periodLocationList; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return DateTimeValue */ public function getStartTime() { return $this->startTime; } /** * @param DateTimeValue $startTime */ public function setStartTime(DateTimeValue $startTime) { $this->startTime = $startTime; } /** * @return DateTimeValue */ public function getEndTime() { return $this->endTime; } /** * @param DateTimeValue $endTime */ public function setEndTime(DateTimeValue $endTime) { $this->endTime = $endTime; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Collection */ public function getPeriodServiceList() { return $this->periodServiceList; } /** * @param Collection $periodServiceList */ public function setPeriodServiceList(Collection $periodServiceList) { $this->periodServiceList = $periodServiceList; } /** * @return Collection */ public function getPeriodLocationList() { return $this->periodLocationList; } /** * @param Collection $periodLocationList */ public function setPeriodLocationList(Collection $periodLocationList) { $this->periodLocationList = $periodLocationList; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'startTime' => $this->startTime->getValue()->format('H:i:s'), 'endTime' => $this->endTime->getValue()->format('H:i:s') === '00:00:00' ? '24:00:00' : $this->endTime->getValue()->format('H:i:s'), 'locationId' => $this->locationId ? $this->getLocationId()->getValue() : null, 'periodServiceList' => $this->periodServiceList->toArray(), 'periodLocationList' => $this->periodLocationList->toArray(), ]; } } Schedule/Period.php 0000666 00000007276 15165376126 0010267 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class Period * * @package AmeliaBooking\Domain\Entity\Schedule */ class Period { /** @var Id */ private $id; /** @var DateTimeValue */ private $startTime; /** @var DateTimeValue */ private $endTime; /** @var Id */ private $locationId; /** @var Collection */ private $periodServiceList; /** @var Collection */ private $periodLocationList; /** * Period constructor. * * @param DateTimeValue $startTime * @param DateTimeValue $endTime * @param Collection $periodServiceList * @param Collection $periodLocationList */ public function __construct( DateTimeValue $startTime, DateTimeValue $endTime, Collection $periodServiceList, Collection $periodLocationList ) { $this->startTime = $startTime; $this->endTime = $endTime; $this->periodServiceList = $periodServiceList; $this->periodLocationList = $periodLocationList; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return DateTimeValue */ public function getStartTime() { return $this->startTime; } /** * @param DateTimeValue $startTime */ public function setStartTime(DateTimeValue $startTime) { $this->startTime = $startTime; } /** * @return DateTimeValue */ public function getEndTime() { return $this->endTime; } /** * @param DateTimeValue $endTime */ public function setEndTime(DateTimeValue $endTime) { $this->endTime = $endTime; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Collection */ public function getPeriodServiceList() { return $this->periodServiceList; } /** * @param Collection $periodServiceList */ public function setPeriodServiceList(Collection $periodServiceList) { $this->periodServiceList = $periodServiceList; } /** * @return Collection */ public function getPeriodLocationList() { return $this->periodLocationList; } /** * @param Collection $periodLocationList */ public function setPeriodLocationList(Collection $periodLocationList) { $this->periodLocationList = $periodLocationList; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'startTime' => $this->startTime->getValue()->format('H:i:s'), 'endTime' => $this->endTime->getValue()->format('H:i:s') === '00:00:00' ? '24:00:00' : $this->endTime->getValue()->format('H:i:s'), 'locationId' => $this->locationId ? $this->getLocationId()->getValue() : null, 'periodServiceList' => $this->periodServiceList->toArray(), 'periodLocationList' => $this->periodLocationList->toArray(), ]; } } Schedule/SpecialDay.php 0000666 00000004746 15165376126 0011062 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\Collection\Collection; /** * Class SpecialDay * * @package AmeliaBooking\Domain\Entity\Schedule */ class SpecialDay { /** @var Id */ private $id; /** @var DateTimeValue */ private $startDate; /** @var DateTimeValue */ private $endDate; /** @var Collection */ private $periodList; /** * SpecialDay constructor. * * @param DateTimeValue $startDate * @param DateTimeValue $endDate * @param Collection $periodList */ public function __construct( DateTimeValue $startDate, DateTimeValue $endDate, Collection $periodList ) { $this->startDate = $startDate; $this->endDate = $endDate; $this->periodList = $periodList; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return DateTimeValue */ public function getStartDate() { return $this->startDate; } /** * @param DateTimeValue $startDate */ public function setStartDate(DateTimeValue $startDate) { $this->startDate = $startDate; } /** * @return DateTimeValue */ public function getEndDate() { return $this->endDate; } /** * @param DateTimeValue $endDate */ public function setEndDate(DateTimeValue $endDate) { $this->endDate = $endDate; } /** * @return Collection */ public function getPeriodList() { return $this->periodList; } /** * @param Collection $periodList */ public function setPeriodList(Collection $periodList) { $this->periodList = $periodList; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'startDate' => $this->startDate->getValue()->format('Y-m-d'), 'endDate' => $this->endDate->getValue()->format('Y-m-d'), 'periodList' => $this->periodList->toArray(), ]; } } Schedule/WeekDay.php 0000666 00000007202 15165376126 0010363 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\Collection\Collection; /** * Class WeekDay * * @package AmeliaBooking\Domain\Entity\Schedule */ class WeekDay { /** @var Id */ private $id; /** @var IntegerValue */ private $dayIndex; /** @var DateTimeValue */ private $startTime; /** @var DateTimeValue */ private $endTime; /** @var Collection */ private $timeOutList; /** @var Collection */ private $periodList; /** * WeekDay constructor. * * @param IntegerValue $dayIndex * @param DateTimeValue $startTime * @param DateTimeValue $endTime * @param Collection $timeOutList * @param Collection $periodList */ public function __construct( IntegerValue $dayIndex, DateTimeValue $startTime, DateTimeValue $endTime, Collection $timeOutList, Collection $periodList ) { $this->dayIndex = $dayIndex; $this->startTime = $startTime; $this->endTime = $endTime; $this->timeOutList = $timeOutList; $this->periodList = $periodList; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return IntegerValue */ public function getDayIndex() { return $this->dayIndex; } /** * @param IntegerValue $dayIndex */ public function setDayIndex(IntegerValue $dayIndex) { $this->dayIndex = $dayIndex; } /** * @return DateTimeValue */ public function getStartTime() { return $this->startTime; } /** * @param DateTimeValue $startTime */ public function setStartTime(DateTimeValue $startTime) { $this->startTime = $startTime; } /** * @return DateTimeValue */ public function getEndTime() { return $this->endTime; } /** * @param DateTimeValue $endTime */ public function setEndTime(DateTimeValue $endTime) { $this->endTime = $endTime; } /** * @return Collection */ public function getTimeOutList() { return $this->timeOutList; } /** * @param Collection $timeOutList */ public function setTimeOutList(Collection $timeOutList) { $this->timeOutList = $timeOutList; } /** * @return Collection */ public function getPeriodList() { return $this->periodList; } /** * @param Collection $periodList */ public function setPeriodList(Collection $periodList) { $this->periodList = $periodList; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'dayIndex' => $this->dayIndex->getValue(), 'startTime' => $this->startTime->getValue()->format('H:i:s'), 'endTime' => $this->endTime->getValue()->format('H:i:s') === '00:00:00' ? '24:00:00' : $this->endTime->getValue()->format('H:i:s'), 'timeOutList' => $this->timeOutList->toArray(), 'periodList' => $this->periodList->toArray(), ]; } } Schedule/SpecialDayPeriodService.php 0000666 00000002514 15165376126 0013535 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class SpecialDayPeriodService * * @package AmeliaBooking\Domain\Entity\Schedule */ class SpecialDayPeriodService { /** @var Id */ private $id; /** @var Id */ private $serviceId; /** * SpecialDayPeriodService constructor. * * @param Id $serviceId */ public function __construct( Id $serviceId ) { $this->serviceId = $serviceId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getServiceId() { return $this->serviceId; } /** * @param Id $serviceId */ public function setServiceId(Id $serviceId) { $this->serviceId = $serviceId; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'serviceId' => $this->serviceId->getValue(), ]; } } Schedule/PeriodService.php 0000666 00000002411 15165376126 0011572 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class PeriodService * * @package AmeliaBooking\Domain\Entity\Schedule */ class PeriodService { /** @var Id */ private $id; /** @var Id */ private $serviceId; /** * PeriodService constructor. * * @param Id $serviceId */ public function __construct( Id $serviceId ) { $this->serviceId = $serviceId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getServiceId() { return $this->serviceId; } /** * @param Id $serviceId */ public function setServiceId(Id $serviceId) { $this->serviceId = $serviceId; } public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'serviceId' => $this->serviceId->getValue(), ]; } } Schedule/SpecialDayPeriodLocation.php 0000666 00000002536 15165376126 0013711 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Schedule; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class SpecialDayPeriodLocation * * @package AmeliaBooking\Domain\Entity\Schedule */ class SpecialDayPeriodLocation { /** @var Id */ private $id; /** @var Id */ private $locationId; /** * SpecialDayPeriodLocation constructor. * * @param Id $locationId */ public function __construct( Id $locationId ) { $this->locationId = $locationId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'locationId' => $this->locationId->getValue(), ]; } } Gallery/GalleryImage.php 0000666 00000006042 15165376126 0011240 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Gallery; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\Picture; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\EntityType; /** * Class GalleryImage * * @package AmeliaBooking\Domain\Entity\Gallery */ class GalleryImage { /** @var Id */ private $id; /** @var Id */ private $entityId; /** @var EntityType */ private $entityType; /** @var Picture */ private $picture; /** @var PositiveInteger */ protected $position; /** * GalleryImage constructor. * * @param EntityType $entityType * @param Picture $picture * @param PositiveInteger $position */ public function __construct( EntityType $entityType, Picture $picture, PositiveInteger $position ) { $this->entityType = $entityType; $this->picture = $picture; $this->position = $position; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getEntityId() { return $this->entityId; } /** * @param Id $entityId */ public function setEntityId(Id $entityId) { $this->entityId = $entityId; } /** * @return EntityType */ public function getEntityType() { return $this->entityType; } /** * @param EntityType $entityType */ public function setEntityType(EntityType $entityType) { $this->entityType = $entityType; } /** * @return Picture */ public function getPicture() { return $this->picture; } /** * @param Picture $picture */ public function setPicture(Picture $picture) { $this->picture = $picture; } /** * @return PositiveInteger */ public function getPosition() { return $this->position; } /** * @param PositiveInteger $position */ public function setPosition(PositiveInteger $position) { $this->position = $position; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'entityId' => null !== $this->getEntityId() ? $this->getEntityId()->getValue() : null, 'entityType' => null !== $this->getEntityType() ? $this->getEntityType()->getValue() : null, 'pictureFullPath' => null !== $this->getPicture() ? $this->getPicture()->getFullPath() : null, 'pictureThumbPath' => null !== $this->getPicture() ? $this->getPicture()->getThumbPath() : null, 'position' => null !== $this->getPosition() ? $this->getPosition()->getValue() : null, ]; } } Outlook/OutlookCalendar.php 0000666 00000003507 15165376126 0012024 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Outlook; use AmeliaBooking\Domain\ValueObjects\String\Email; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Label; use AmeliaBooking\Domain\ValueObjects\String\Token; /** * Class OutlookCalendar * * @package AmeliaBooking\Domain\Entity\Outlook */ class OutlookCalendar { /** @var Id */ private $id; /** @var Token */ private $token; /** @var Label */ private $calendarId; /** * OutlookCalendar constructor. * * @param Token $token * @param Label $calendarId */ public function __construct( Token $token, Label $calendarId ) { $this->token = $token; $this->calendarId = $calendarId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Token */ public function getToken() { return $this->token; } /** * @param Token $token */ public function setToken($token) { $this->token = $token; } /** * @return Label */ public function getCalendarId() { return $this->calendarId; } /** * @param Label $calendarId */ public function setCalendarId($calendarId) { $this->calendarId = $calendarId; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'token' => $this->getToken()->getValue(), 'calendarId' => null !== $this->getCalendarId() ? $this->getCalendarId()->getValue() : null, ]; } } Google/GoogleCalendar.php 0000666 00000003410 15165376126 0011355 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Google; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Token; /** * Class GoogleCalendar * * @package AmeliaBooking\Domain\Entity\Google */ class GoogleCalendar { /** @var Id */ private $id; /** @var Token */ private $token; /** @var Name */ private $calendarId; /** * GoogleCalendar constructor. * * @param Token $token * @param Name $calendarId */ public function __construct( Token $token, Name $calendarId ) { $this->token = $token; $this->calendarId = $calendarId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Token */ public function getToken() { return $this->token; } /** * @param Token $token */ public function setToken($token) { $this->token = $token; } /** * @return Name */ public function getCalendarId() { return $this->calendarId; } /** * @param Name $calendarId */ public function setCalendarId($calendarId) { $this->calendarId = $calendarId; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'token' => $this->getToken()->getValue(), 'calendarId' => null !== $this->getCalendarId() ? $this->getCalendarId()->getValue() : null, ]; } } Settings/ZoomSettings.php 0000666 00000001313 15165376126 0011540 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class ZoomSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class ZoomSettings { /** @var bool */ private $enabled; /** * @return bool */ public function getEnabled() { return $this->enabled; } /** * @param bool $enabled */ public function setEnabled($enabled) { $this->enabled = $enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->getEnabled(), ]; } } Settings/PaymentMollieSettings.php 0000666 00000001120 15165376126 0013367 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentMollieSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentMollieSettings { /** @var bool */ private $enabled; /** * @return int */ public function getEnabled() { return $this->enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->enabled, ]; } } Settings/PaymentWooCommerceSettings.php 0000666 00000001132 15165376126 0014370 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentWooCommerceSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentWooCommerceSettings { /** @var bool */ private $enabled; /** * @return int */ public function getEnabled() { return $this->enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->enabled, ]; } } Settings/GeneralSettings.php 0000666 00000006562 15165376126 0012204 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class GeneralSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class GeneralSettings { /** @var int */ private $minimumTimeRequirementPriorToBooking; /** @var int */ private $minimumTimeRequirementPriorToCanceling; /** @var int */ private $minimumTimeRequirementPriorToRescheduling; /** @var string */ private $defaultAppointmentStatus; /** @var int */ private $numberOfDaysAvailableForBooking; /** * @return int */ public function getMinimumTimeRequirementPriorToBooking() { return $this->minimumTimeRequirementPriorToBooking; } /** * @param int $minimumTimeRequirementPriorToBooking */ public function setMinimumTimeRequirementPriorToBooking($minimumTimeRequirementPriorToBooking) { $this->minimumTimeRequirementPriorToBooking = $minimumTimeRequirementPriorToBooking; } /** * @return int */ public function getMinimumTimeRequirementPriorToCanceling() { return $this->minimumTimeRequirementPriorToCanceling; } /** * @param int $minimumTimeRequirementPriorToCanceling */ public function setMinimumTimeRequirementPriorToCanceling($minimumTimeRequirementPriorToCanceling) { $this->minimumTimeRequirementPriorToCanceling = $minimumTimeRequirementPriorToCanceling; } /** * @return int */ public function getMinimumTimeRequirementPriorToRescheduling() { return $this->minimumTimeRequirementPriorToRescheduling; } /** * @param int $minimumTimeRequirementPriorToRescheduling */ public function setMinimumTimeRequirementPriorToRescheduling($minimumTimeRequirementPriorToRescheduling) { $this->minimumTimeRequirementPriorToRescheduling = $minimumTimeRequirementPriorToRescheduling; } /** * @return string */ public function getDefaultAppointmentStatus() { return $this->defaultAppointmentStatus; } /** * @param string $defaultAppointmentStatus */ public function setDefaultAppointmentStatus($defaultAppointmentStatus) { $this->defaultAppointmentStatus = $defaultAppointmentStatus; } /** * @return int */ public function getNumberOfDaysAvailableForBooking() { return $this->numberOfDaysAvailableForBooking; } /** * @param int $numberOfDaysAvailableForBooking */ public function setNumberOfDaysAvailableForBooking($numberOfDaysAvailableForBooking) { $this->numberOfDaysAvailableForBooking = $numberOfDaysAvailableForBooking; } /** * @return array */ public function toArray() { return [ 'minimumTimeRequirementPriorToBooking' => $this->getMinimumTimeRequirementPriorToBooking(), 'minimumTimeRequirementPriorToCanceling' => $this->getMinimumTimeRequirementPriorToCanceling(), 'minimumTimeRequirementPriorToRescheduling' => $this->getMinimumTimeRequirementPriorToRescheduling(), 'defaultAppointmentStatus' => $this->getDefaultAppointmentStatus(), 'numberOfDaysAvailableForBooking' => $this->getNumberOfDaysAvailableForBooking(), ]; } } Settings/PaymentStripeSettings.php 0000666 00000001120 15165376126 0013414 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentStripeSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentStripeSettings { /** @var bool */ private $enabled; /** * @return int */ public function getEnabled() { return $this->enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->enabled, ]; } } Settings/LessonSpaceSettings.php 0000666 00000001331 15165376126 0013033 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class LessonSpaceSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class LessonSpaceSettings { /** @var bool */ private $enabled; /** * @return bool */ public function getEnabled() { return $this->enabled; } /** * @param bool $enabled */ public function setEnabled($enabled) { $this->enabled = $enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->getEnabled(), ]; } } Settings/PaymentPayPalSettings.php 0000666 00000001120 15165376126 0013334 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentPayPalSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentPayPalSettings { /** @var bool */ private $enabled; /** * @return int */ public function getEnabled() { return $this->enabled; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->enabled, ]; } } Settings/Settings.php 0000666 00000004126 15165376126 0010700 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class Settings * * @package AmeliaBooking\Domain\Entity\Settings */ class Settings { /** @var GeneralSettings */ private $generalSettings; /** @var PaymentSettings */ private $paymentSettings; /** @var ZoomSettings */ private $zoomSettings; /** @var LessonSpaceSettings */ private $lessonSpaceSettings; /** * @return GeneralSettings */ public function getGeneralSettings() { return $this->generalSettings; } /** * @param GeneralSettings $generalSettings */ public function setGeneralSettings($generalSettings) { $this->generalSettings = $generalSettings; } /** * @return PaymentSettings */ public function getPaymentSettings() { return $this->paymentSettings; } /** * @param PaymentSettings $paymentSettings */ public function setPaymentSettings($paymentSettings) { $this->paymentSettings = $paymentSettings; } /** * @return ZoomSettings */ public function getZoomSettings() { return $this->zoomSettings; } /** * @param ZoomSettings $zoomSettings */ public function setZoomSettings($zoomSettings) { $this->zoomSettings = $zoomSettings; } /** * @return LessonSpaceSettings */ public function getLessonSpaceSettings() { return $this->lessonSpaceSettings; } /** * @param LessonSpaceSettings $lessonSpaceSettings */ public function setLessonSpaceSettings($lessonSpaceSettings) { $this->lessonSpaceSettings = $lessonSpaceSettings; } /** * @return array */ public function toArray() { return [ 'general' => $this->getGeneralSettings() ? $this->getGeneralSettings()->toArray() : null, 'payments' => $this->getPaymentSettings() ? $this->getPaymentSettings()->toArray() : null, ]; } } Settings/PaymentSettings.php 0000666 00000006406 15165376126 0012241 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentSettings { /** @var bool */ private $onSite; /** @var PaymentPayPalSettings */ private $payPalSettings; /** @var PaymentStripeSettings */ private $stripeSettings; /** @var PaymentWooCommerceSettings */ private $wooCommerceSettings; /** @var PaymentMollieSettings */ private $mollieSettings; /** @var PaymentLinksSettings */ private $paymentLinksSettings; /** * @return bool */ public function getOnSite() { return $this->onSite; } /** * @param bool $onSite */ public function setOnSite($onSite) { $this->onSite = $onSite; } /** * @return PaymentPayPalSettings */ public function getPayPalSettings() { return $this->payPalSettings; } /** * @param PaymentPayPalSettings $payPalSettings */ public function setPayPalSettings($payPalSettings) { $this->payPalSettings = $payPalSettings; } /** * @return PaymentStripeSettings */ public function getStripeSettings() { return $this->stripeSettings; } /** * @param PaymentStripeSettings $stripeSettings */ public function setStripeSettings($stripeSettings) { $this->stripeSettings = $stripeSettings; } /** * @return PaymentWooCommerceSettings */ public function getWooCommerceSettings() { return $this->wooCommerceSettings; } /** * @param PaymentWooCommerceSettings $wooCommerceSettings */ public function setWooCommerceSettings($wooCommerceSettings) { $this->wooCommerceSettings = $wooCommerceSettings; } /** * @return PaymentMollieSettings */ public function getMollieSettings() { return $this->mollieSettings; } /** * @param PaymentMollieSettings $mollieSettings */ public function setMollieSettings($mollieSettings) { $this->mollieSettings = $mollieSettings; } /** * @return PaymentLinksSettings */ public function getPaymentLinksSettings() { return $this->paymentLinksSettings; } /** * @param PaymentLinksSettings $paymentLinksSettings */ public function setPaymentLinksSettings(PaymentLinksSettings $paymentLinksSettings) { $this->paymentLinksSettings = $paymentLinksSettings; } /** * @return array */ public function toArray() { return [ 'onSite' => $this->onSite, 'payPal' => $this->getPayPalSettings() ? $this->getPayPalSettings()->toArray() : null, 'stripe' => $this->getStripeSettings() ? $this->getStripeSettings()->toArray() : null, 'wc' => $this->getWooCommerceSettings() ? $this->getWooCommerceSettings()->toArray() : null, 'mollie' => $this->getMollieSettings() ? $this->getMollieSettings()->toArray() : null, 'paymentLinks' => $this->getPaymentLinksSettings() ? $this->getPaymentLinksSettings()->toArray() : null, ]; } } Settings/PaymentLinksSettings.php 0000666 00000002020 15165376126 0013226 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Settings; /** * Class PaymentLinksSettings * * @package AmeliaBooking\Domain\Entity\Settings */ class PaymentLinksSettings { /** @var bool */ private $enabled; /** @var bool */ private $changeBookingStatus; /** * @return bool */ public function getEnabled() { return $this->enabled; } /** * @return bool */ public function isChangeBookingStatus() { return $this->changeBookingStatus; } /** * @param bool $changeBookingStatus */ public function setChangeBookingStatus($changeBookingStatus) { $this->changeBookingStatus = $changeBookingStatus; } /** * @return array */ public function toArray() { return [ 'enabled' => $this->enabled, 'changeBookingStatus' => $this->changeBookingStatus ]; } } Bookable/AbstractCategory.php 0000666 00000006560 15165376126 0012263 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Status; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class AbstractCategory * * @package AmeliaBooking\Domain\Entity\Bookable */ abstract class AbstractCategory { /** @var Id */ private $id; /** @var Status */ protected $status; /** @var Name */ protected $name; /** @var Collection */ private $serviceList; /** @var PositiveInteger */ protected $position; /** @var Json */ protected $translations; /** * AbstractCategory constructor. * * @param Status $status * @param Name $name * @param PositiveInteger $position */ public function __construct( Status $status, Name $name, PositiveInteger $position ) { $this->status = $status; $this->name = $name; $this->position = $position; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return Collection */ public function getServiceList() { return $this->serviceList; } /** * @param Collection $serviceList */ public function setServiceList(Collection $serviceList) { $this->serviceList = $serviceList; } /** * @return PositiveInteger */ public function getPosition() { return $this->position; } /** * @param PositiveInteger $position */ public function setPosition($position) { $this->position = $position; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'status' => $this->getStatus()->getValue(), 'name' => $this->getName()->getValue(), 'serviceList' => $this->getServiceList() ? $this->getServiceList()->toArray() : [], 'position' => $this->getPosition()->getValue(), 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, ]; } } Bookable/Service/Extra.php 0000666 00000004577 15165376126 0011513 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Entity\Bookable\AbstractExtra; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Duration; /** * Class Extra * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class Extra extends AbstractExtra { /** @var Duration */ private $duration; /** @var Id */ private $serviceId; /** @var BooleanValueObject */ protected $aggregatedPrice; /** @var Json */ private $translations; /** * @return Duration */ public function getDuration() { return $this->duration; } /** * @param Duration $duration */ public function setDuration(Duration $duration) { $this->duration = $duration; } /** * @return Id */ public function getServiceId() { return $this->serviceId; } /** * @param Id $serviceId */ public function setServiceId(Id $serviceId) { $this->serviceId = $serviceId; } /** * @return BooleanValueObject */ public function getAggregatedPrice() { return $this->aggregatedPrice; } /** * @param BooleanValueObject $aggregatedPrice */ public function setAggregatedPrice(BooleanValueObject $aggregatedPrice) { $this->aggregatedPrice = $aggregatedPrice; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'duration' => $this->getDuration() ? $this->getDuration()->getValue() : null, 'serviceId' => $this->getServiceId() ? $this->getServiceId()->getValue() : null, 'aggregatedPrice' => $this->getAggregatedPrice() ? $this->getAggregatedPrice()->getValue() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, ] ); } } Bookable/Service/Resource.php 0000666 00000006676 15165376126 0012221 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\String\EntityType; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Status; /** * Class Resource * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class Resource { /** @var Id */ private $id; /** @var Name */ private $name; /** @var PositiveInteger */ private $quantity; /** @var EntityType */ private $shared; /** @var Status */ private $status; /** @var array */ private $entities; /** @var BooleanValueObject */ private $countAdditionalPeople; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName($name) { $this->name = $name; } /** * @return PositiveInteger */ public function getQuantity() { return $this->quantity; } /** * @param PositiveInteger $quantity */ public function setQuantity($quantity) { $this->quantity = $quantity; } /** * @return EntityType */ public function getShared() { return $this->shared; } /** * @param EntityType $shared */ public function setShared($shared) { $this->shared = $shared; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus($status) { $this->status = $status; } /** * @return array */ public function getEntities() { return $this->entities; } /** * @param array $entities */ public function setEntities($entities) { $this->entities = $entities; } /** * @return BooleanValueObject */ public function getCountAdditionalPeople() { return $this->countAdditionalPeople; } /** * @param BooleanValueObject $countAdditionalPeople */ public function setCountAdditionalPeople($countAdditionalPeople) { $this->countAdditionalPeople = $countAdditionalPeople; } /** * @return array */ public function toArray() { return [ 'id' => !empty($this->getId()) ? $this->getId()->getValue() : null, 'name' => !empty($this->getName()) ? $this->getName()->getValue() : '', 'quantity' => !empty($this->getQuantity()) ? $this->getQuantity()->getValue() : 1, 'shared' => !empty($this->getShared()) ? $this->getShared()->getValue() : false, 'status' => $this->getStatus()->getValue(), 'entities' => $this->getEntities(), 'countAdditionalPeople' => $this->getCountAdditionalPeople() ? $this->getCountAdditionalPeople()->getValue() : null ]; } } Bookable/Service/Service.php 0000666 00000026340 15165376126 0012020 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; use AmeliaBooking\Domain\ValueObjects\String\Cycle; use AmeliaBooking\Domain\ValueObjects\String\Status; use AmeliaBooking\Domain\ValueObjects\Priority; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\Entity\Bookable\AbstractBookable; use AmeliaBooking\Domain\ValueObjects\Duration; use AmeliaBooking\Domain\ValueObjects\PositiveDuration; /** * Class Service * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class Service extends AbstractBookable { /** @var IntegerValue */ private $minCapacity; /** @var IntegerValue */ private $maxCapacity; /** @var PositiveDuration */ private $duration; /** @var Duration */ private $timeBefore; /** @var Duration */ private $timeAfter; /** @var IntegerValue */ private $minSelectedExtras; /** @var BooleanValueObject */ private $bringingAnyone; /** @var BooleanValueObject */ private $mandatoryExtra; /** @var Priority */ private $priority; /** @var Collection */ private $gallery; /** @var Status */ protected $status; /** @var Id */ protected $categoryId; /** @var Category */ protected $category; /** @var BooleanValueObject */ protected $show; /** @var BooleanValueObject */ protected $aggregatedPrice; /** @var Cycle */ protected $recurringCycle; /** @var Name */ protected $recurringSub; /** @var WholeNumber */ protected $recurringPayment; /** @var Json */ protected $translations; /** @var Json */ protected $customPricing; /** @var IntegerValue */ private $maxExtraPeople; /** @var Json */ protected $limitPerCustomer; /** * @return Id */ public function getCategoryId() { return $this->categoryId; } /** * @param Id $categoryId */ public function setCategoryId(Id $categoryId) { $this->categoryId = $categoryId; } /** * @return Category */ public function getCategory() { return $this->category; } /** * @param Category $category */ public function setCategory(Category $category) { $this->category = $category; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return IntegerValue */ public function getMinCapacity() { return $this->minCapacity; } /** * @param IntegerValue $minCapacity */ public function setMinCapacity(IntegerValue $minCapacity) { $this->minCapacity = $minCapacity; } /** * @return IntegerValue */ public function getMaxCapacity() { return $this->maxCapacity; } /** * @param IntegerValue $maxCapacity */ public function setMaxCapacity(IntegerValue $maxCapacity) { $this->maxCapacity = $maxCapacity; } /** * @return PositiveDuration */ public function getDuration() { return $this->duration; } /** * @param PositiveDuration $duration */ public function setDuration(PositiveDuration $duration) { $this->duration = $duration; } /** * @return Duration */ public function getTimeBefore() { return $this->timeBefore; } /** * @param Duration $timeBefore */ public function setTimeBefore(Duration $timeBefore) { $this->timeBefore = $timeBefore; } /** * @return IntegerValue */ public function getMinSelectedExtras() { return $this->minSelectedExtras; } /** * @param IntegerValue $minSelectedExtras */ public function setMinSelectedExtras(IntegerValue $minSelectedExtras) { $this->minSelectedExtras = $minSelectedExtras; } /** * @return Duration */ public function getTimeAfter() { return $this->timeAfter; } /** * @param Duration $timeAfter */ public function setTimeAfter(Duration $timeAfter) { $this->timeAfter = $timeAfter; } /** * @return BooleanValueObject */ public function getBringingAnyone() { return $this->bringingAnyone; } /** * @param BooleanValueObject $bringingAnyone */ public function setBringingAnyone(BooleanValueObject $bringingAnyone) { $this->bringingAnyone = $bringingAnyone; } /** * @return BooleanValueObject */ public function getShow() { return $this->show; } /** * @param BooleanValueObject $show */ public function setShow(BooleanValueObject $show) { $this->show = $show; } /** * @return BooleanValueObject */ public function getAggregatedPrice() { return $this->aggregatedPrice; } /** * @param BooleanValueObject $aggregatedPrice */ public function setAggregatedPrice(BooleanValueObject $aggregatedPrice) { $this->aggregatedPrice = $aggregatedPrice; } /** * @return BooleanValueObject */ public function getMandatoryExtra() { return $this->mandatoryExtra; } /** * @param BooleanValueObject $mandatoryExtra */ public function setMandatoryExtra(BooleanValueObject $mandatoryExtra) { $this->mandatoryExtra = $mandatoryExtra; } /** * @return Priority */ public function getPriority() { return $this->priority; } /** * @param Priority $priority */ public function setPriority(Priority $priority) { $this->priority = $priority; } /** * @return Collection */ public function getGallery() { return $this->gallery; } /** * @param Collection $gallery */ public function setGallery(Collection $gallery) { $this->gallery = $gallery; } /** * @return Cycle */ public function getRecurringCycle() { return $this->recurringCycle; } /** * @param Cycle $recurringCycle */ public function setRecurringCycle(Cycle $recurringCycle) { $this->recurringCycle = $recurringCycle; } /** * @return Name */ public function getRecurringSub() { return $this->recurringSub; } /** * @param Name $recurringSub */ public function setRecurringSub(Name $recurringSub) { $this->recurringSub = $recurringSub; } /** * @return WholeNumber */ public function getRecurringPayment() { return $this->recurringPayment; } /** * @param WholeNumber $recurringPayment */ public function setRecurringPayment(WholeNumber $recurringPayment) { $this->recurringPayment = $recurringPayment; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return Json */ public function getCustomPricing() { return $this->customPricing; } /** * @param Json $customPricing */ public function setCustomPricing($customPricing) { $this->customPricing = $customPricing; } /** * @return IntegerValue */ public function getMaxExtraPeople() { return $this->maxExtraPeople; } /** * @param IntegerValue $maxExtraPeople */ public function setMaxExtraPeople($maxExtraPeople) { $this->maxExtraPeople = $maxExtraPeople; } /** * @return Json */ public function getLimitPerCustomer() { return $this->limitPerCustomer; } /** * @param Json $limitPerCustomer */ public function setLimitPerCustomer($limitPerCustomer) { $this->limitPerCustomer = $limitPerCustomer; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'minCapacity' => $this->getMinCapacity() ? $this->getMinCapacity()->getValue() : null, 'maxCapacity' => $this->getMaxCapacity() ? $this->getMaxCapacity()->getValue() : null, 'duration' => $this->getDuration() ? $this->getDuration()->getValue() : null, 'timeBefore' => $this->getTimeBefore() ? $this->getTimeBefore()->getValue() : null, 'timeAfter' => $this->getTimeAfter() ? $this->getTimeAfter()->getValue() : null, 'bringingAnyone' => $this->getBringingAnyone() ? $this->getBringingAnyone()->getValue() : null, 'show' => $this->getShow() ? $this->getShow()->getValue() : null, 'aggregatedPrice' => $this->getAggregatedPrice() ? $this->getAggregatedPrice()->getValue() : null, 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, 'categoryId' => $this->getCategoryId() ? $this->getCategoryId()->getValue() : null, 'category' => $this->getCategory() ? $this->getCategory()->toArray() : null, 'priority' => $this->getPriority() ? $this->getPriority()->getValue() : [], 'gallery' => $this->getGallery() ? $this->getGallery()->toArray() : [], 'recurringCycle' => $this->getRecurringCycle() ? $this->getRecurringCycle()->getValue() : null, 'recurringSub' => $this->getRecurringSub() ? $this->getRecurringSub()->getValue() : null, 'recurringPayment' => $this->getRecurringPayment() ? $this->getRecurringPayment()->getValue() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, 'minSelectedExtras'=> $this->getMinSelectedExtras() ? $this->getMinSelectedExtras()->getValue() : null, 'mandatoryExtra' => $this->getMandatoryExtra() ? $this->getMandatoryExtra()->getValue() : null, 'customPricing' => $this->getCustomPricing() ? $this->getCustomPricing()->getValue() : null, 'maxExtraPeople' => $this->getMaxExtraPeople() ? $this->getMaxExtraPeople()->getValue() : null, 'limitPerCustomer' => $this->getLimitPerCustomer() ? $this->getLimitPerCustomer()->getValue() : null, ] ); } } Bookable/Service/PackageCustomerService.php 0000666 00000006032 15165376126 0015012 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; /** * Class PackageCustomerService * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class PackageCustomerService { /** @var Id */ private $id; /** @var PackageCustomer */ private $packageCustomer; /** @var Id */ private $serviceId; /** @var Id */ private $providerId; /** @var Id */ private $locationId; /** @var WholeNumber */ private $bookingsCount; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getServiceId() { return $this->serviceId; } /** * @param Id $serviceId */ public function setServiceId(Id $serviceId) { $this->serviceId = $serviceId; } /** * @return Id */ public function getProviderId() { return $this->providerId; } /** * @param Id $providerId */ public function setProviderId(Id $providerId) { $this->providerId = $providerId; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return WholeNumber */ public function getBookingsCount() { return $this->bookingsCount; } /** * @param WholeNumber $bookingsCount */ public function setBookingsCount(WholeNumber $bookingsCount) { $this->bookingsCount = $bookingsCount; } /** * @return PackageCustomer */ public function getPackageCustomer() { return $this->packageCustomer; } /** * @param PackageCustomer $packageCustomer */ public function setPackageCustomer(PackageCustomer $packageCustomer) { $this->packageCustomer = $packageCustomer; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'serviceId' => $this->getServiceId() ? $this->getServiceId()->getValue() : null, 'providerId' => $this->getProviderId() ? $this->getProviderId()->getValue() : null, 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null, 'bookingsCount' => $this->getBookingsCount() ? $this->getBookingsCount()->getValue() : null, 'packageCustomer' => $this->getPackageCustomer() ? $this->getPackageCustomer()->toArray() : null, ]; } } Bookable/Service/PackageCustomer.php 0000666 00000013205 15165376126 0013471 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; use AmeliaBooking\Domain\ValueObjects\String\BookingStatus; use AmeliaBooking\Domain\Entity\Coupon\Coupon; /** * Class PackageCustomer * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class PackageCustomer { /** @var Id */ private $id; /** @var Id */ private $packageId; /** @var Id */ private $customerId; /** @var Price */ private $price; /** @var DateTimeValue */ private $end; /** @var DateTimeValue */ private $start; /** @var DateTimeValue */ private $purchased; /** @var Collection */ private $payments; /** @var BookingStatus */ protected $status; /** @var WholeNumber */ private $bookingsCount; /** @var Id */ private $couponId; /** @var Coupon */ protected $coupon; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getPackageId() { return $this->packageId; } /** * @param Id $packageId */ public function setPackageId(Id $packageId) { $this->packageId = $packageId; } /** * @return Id */ public function getCustomerId() { return $this->customerId; } /** * @param Id $customerId */ public function setCustomerId(Id $customerId) { $this->customerId = $customerId; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return Collection */ public function getPayments() { return $this->payments; } /** * @param Collection $payments */ public function setPayments(Collection $payments) { $this->payments = $payments; } /** * @return DateTimeValue */ public function getEnd() { return $this->end; } /** * @param DateTimeValue $end */ public function setEnd(DateTimeValue $end) { $this->end = $end; } /** * @return DateTimeValue */ public function getStart() { return $this->start; } /** * @param DateTimeValue $start */ public function setStart(DateTimeValue $start) { $this->start = $start; } /** * @return DateTimeValue */ public function getPurchased() { return $this->purchased; } /** * @param DateTimeValue $purchased */ public function setPurchased(DateTimeValue $purchased) { $this->purchased = $purchased; } /** * @return BookingStatus */ public function getStatus() { return $this->status; } /** * @param BookingStatus $status */ public function setStatus(BookingStatus $status) { $this->status = $status; } /** * @return WholeNumber */ public function getBookingsCount() { return $this->bookingsCount; } /** * @param WholeNumber $bookingsCount */ public function setBookingsCount(WholeNumber $bookingsCount) { $this->bookingsCount = $bookingsCount; } /** * @return Id */ public function getCouponId() { return $this->couponId; } /** * @param Id $couponId */ public function setCouponId(Id $couponId) { $this->couponId = $couponId; } /** * @return Coupon */ public function getCoupon() { return $this->coupon; } /** * @param Coupon $coupon */ public function setCoupon(Coupon $coupon) { $this->coupon = $coupon; } /** * @return array */ public function toArray() { $dateTimeFormat = 'Y-m-d H:i:s'; return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'packageId' => $this->getPackageId() ? $this->getPackageId()->getValue() : null, 'customerId' => $this->getCustomerId() ? $this->getCustomerId()->getValue() : null, 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null, 'payments' => $this->getPayments() ? $this->getPayments()->toArray() : null, 'start' => $this->getStart() ? $this->getStart()->getValue()->format($dateTimeFormat) : null, 'end' => $this->getEnd() ? $this->getEnd()->getValue()->format($dateTimeFormat) : null, 'purchased' => $this->getPurchased() ? $this->getPurchased()->getValue()->format($dateTimeFormat) : null, 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, 'bookingsCount' => $this->getBookingsCount() ? $this->getBookingsCount()->getValue() : null, 'couponId' => $this->getCouponId() ? $this->getCouponId()->getValue() : null, 'coupon' => $this->getCoupon() ? $this->getCoupon()->toArray() : null, ]; } } Bookable/Service/Package.php 0000666 00000015505 15165376126 0011754 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Entities; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\DiscountPercentageValue; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\String\BookingType; use AmeliaBooking\Domain\ValueObjects\String\Label; use AmeliaBooking\Domain\ValueObjects\String\Status; use AmeliaBooking\Domain\Entity\Bookable\AbstractBookable; /** * Class Package * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class Package extends AbstractBookable { /** @var Collection */ private $bookable; /** @var Collection */ private $gallery; /** @var Status */ protected $status; /** @var BooleanValueObject */ private $calculatedPrice; /** @var DiscountPercentageValue */ private $discount; /** @var DateTimeValue */ private $endDate; /** @var PositiveInteger */ private $durationCount; /** @var Label */ private $durationType; /** @var Json */ private $translations; /** @var BooleanValueObject */ private $sharedCapacity; /** @var PositiveInteger */ protected $quantity; /** @var Json */ protected $limitPerCustomer; /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return Collection */ public function getBookable() { return $this->bookable; } /** * @param Collection $bookable */ public function setBookable(Collection $bookable) { $this->bookable = $bookable; } /** * @return Collection */ public function getGallery() { return $this->gallery; } /** * @param Collection $gallery */ public function setGallery(Collection $gallery) { $this->gallery = $gallery; } /** * @return BooleanValueObject */ public function getCalculatedPrice() { return $this->calculatedPrice; } /** * @param BooleanValueObject $calculatedPrice */ public function setCalculatedPrice(BooleanValueObject $calculatedPrice) { $this->calculatedPrice = $calculatedPrice; } /** * @return DiscountPercentageValue */ public function getDiscount() { return $this->discount; } /** * @param DiscountPercentageValue $discount */ public function setDiscount(DiscountPercentageValue $discount) { $this->discount = $discount; } /** * @return PositiveInteger */ public function getDurationCount() { return $this->durationCount; } /** * @param PositiveInteger $durationCount */ public function setDurationCount(PositiveInteger $durationCount) { $this->durationCount = $durationCount; } /** * @return Label */ public function getDurationType() { return $this->durationType; } /** * @param Label $durationType */ public function setDurationType(Label $durationType) { $this->durationType = $durationType; } /** * @return DateTimeValue */ public function getEndDate() { return $this->endDate; } /** * @param DateTimeValue $endDate */ public function setEndDate(DateTimeValue $endDate) { $this->endDate = $endDate; } /** * @return BookingType */ public function getType() { return new Bookingtype(Entities::PACKAGE); } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return BooleanValueObject */ public function getSharedCapacity() { return $this->sharedCapacity; } /** * @param BooleanValueObject $sharedCapacity */ public function setSharedCapacity(BooleanValueObject $sharedCapacity) { $this->sharedCapacity = $sharedCapacity; } /** * @return PositiveInteger */ public function getQuantity() { return $this->quantity; } /** * @param PositiveInteger $quantity */ public function setQuantity(PositiveInteger $quantity) { $this->quantity = $quantity; } /** * @return Json */ public function getLimitPerCustomer() { return $this->limitPerCustomer; } /** * @param Json $limitPerCustomer */ public function setLimitPerCustomer($limitPerCustomer) { $this->limitPerCustomer = $limitPerCustomer; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'type' => $this->getType()->getValue(), 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, 'gallery' => $this->getGallery() ? $this->getGallery()->toArray() : [], 'bookable' => $this->getBookable() ? $this->getBookable()->toArray() : [], 'calculatedPrice' => $this->getCalculatedPrice() ? $this->getCalculatedPrice()->getValue() : null, 'discount' => $this->getDiscount() ? $this->getDiscount()->getValue() : null, 'endDate' => $this->getEndDate() ? $this->getEndDate()->getValue()->format('Y-m-d') . ' 00:00:00' : null, 'durationCount' => $this->getDurationCount() ? $this->getDurationCount()->getValue() : null, 'durationType' => $this->getDurationType() ? $this->getDurationType()->getValue() : null, 'position' => $this->getPosition() ? $this->getPosition()->getValue() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, 'sharedCapacity' => $this->getSharedCapacity() ? $this->getSharedCapacity()->getValue() : null, 'quantity' => $this->getQuantity() ? $this->getQuantity()->getValue() : null, 'limitPerCustomer' => $this->getLimitPerCustomer() ? $this->getLimitPerCustomer()->getValue() : null, ] ); } } Bookable/Service/PackageService.php 0000666 00000010513 15165376126 0013267 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; /** * Class PackageService * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class PackageService { /** @var Id */ private $id; /** @var Service */ protected $service; /** @var PositiveInteger */ protected $quantity; /** @var WholeNumber */ protected $minimumScheduled; /** @var WholeNumber */ protected $maximumScheduled; /** @var Collection */ private $providers; /** @var Collection */ private $locations; /** @var BooleanValueObject */ private $allowProviderSelection; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Service */ public function getService() { return $this->service; } /** * @param Service $service */ public function setService(Service $service) { $this->service = $service; } /** * @return PositiveInteger */ public function getQuantity() { return $this->quantity; } /** * @param PositiveInteger $quantity */ public function setQuantity(PositiveInteger $quantity) { $this->quantity = $quantity; } /** * @return WholeNumber */ public function getMinimumScheduled() { return $this->minimumScheduled; } /** * @param WholeNumber $minimumScheduled */ public function setMinimumScheduled(WholeNumber $minimumScheduled) { $this->minimumScheduled = $minimumScheduled; } /** * @return WholeNumber */ public function getMaximumScheduled() { return $this->maximumScheduled; } /** * @param WholeNumber $maximumScheduled */ public function setMaximumScheduled(WholeNumber $maximumScheduled) { $this->maximumScheduled = $maximumScheduled; } /** * @return Collection */ public function getProviders() { return $this->providers; } /** * @param Collection $providers */ public function setProviders(Collection $providers) { $this->providers = $providers; } /** * @return Collection */ public function getLocations() { return $this->locations; } /** * @param Collection $locations */ public function setLocations(Collection $locations) { $this->locations = $locations; } /** * @return BooleanValueObject */ public function getAllowProviderSelection() { return $this->allowProviderSelection; } /** * @param BooleanValueObject $allowProviderSelection */ public function setAllowProviderSelection($allowProviderSelection) { $this->allowProviderSelection = $allowProviderSelection; } /** * @return array */ public function toArray() { return array_merge( [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'quantity' => $this->getQuantity() ? $this->getQuantity()->getValue() : null, 'service' => $this->getService() ? $this->getService()->toArray() : null, 'minimumScheduled' => $this->getMinimumScheduled() ? $this->getMinimumScheduled()->getValue() : null, 'maximumScheduled' => $this->getMaximumScheduled() ? $this->getMaximumScheduled()->getValue() : null, 'providers' => $this->getProviders() ? $this->getProviders()->toArray() : [], 'locations' => $this->getLocations() ? $this->getLocations()->toArray() : [], 'allowProviderSelection' => $this->getAllowProviderSelection() ? $this->getAllowProviderSelection()->getValue() : null, ] ); } } Bookable/Service/Category.php 0000666 00000000377 15165376126 0012177 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Bookable\Service; use AmeliaBooking\Domain\Entity\Bookable\AbstractCategory; /** * Class Category * * @package AmeliaBooking\Domain\Entity\Bookable\Service */ class Category extends AbstractCategory { } Bookable/AbstractExtra.php 0000666 00000006577 15165376126 0011601 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Bookable; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\String\Description; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class AbstractExtra * * @package AmeliaBooking\Domain\Entity\Bookable */ abstract class AbstractExtra { /** @var Id */ private $id; /** @var Name */ protected $name; /** @var Description */ protected $description; /** @var Price */ protected $price; /** @var PositiveInteger */ protected $maxQuantity; /** @var PositiveInteger */ protected $position; /** * @param Name $name * @param Description $description * @param Price $price * @param PositiveInteger $maxQuantity * @param PositiveInteger $position */ public function __construct( Name $name, Description $description, Price $price, PositiveInteger $maxQuantity, PositiveInteger $position ) { $this->name = $name; $this->description = $description; $this->price = $price; $this->maxQuantity = $maxQuantity; $this->position = $position; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return Description */ public function getDescription() { return $this->description; } /** * @param Description $description */ public function setDescription(Description $description) { $this->description = $description; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return PositiveInteger */ public function getMaxQuantity() { return $this->maxQuantity; } /** * @param PositiveInteger $maxQuantity */ public function setMaxQuantity(PositiveInteger $maxQuantity) { $this->maxQuantity = $maxQuantity; } /** * @return PositiveInteger */ public function getPosition() { return $this->position; } /** * @param PositiveInteger $position */ public function setPosition(PositiveInteger $position) { $this->position = $position; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'name' => $this->getName()->getValue(), 'description' => $this->getDescription()->getValue(), 'price' => $this->getPrice()->getValue(), 'maxQuantity' => $this->getMaxQuantity()->getValue(), 'position' => $this->getPosition()->getValue() ]; } } Bookable/AbstractBookable.php 0000666 00000015632 15165376126 0012224 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See COPYING.md for license details. */ namespace AmeliaBooking\Domain\Entity\Bookable; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\Picture; use AmeliaBooking\Domain\ValueObjects\String\Color; use AmeliaBooking\Domain\ValueObjects\String\DepositType; use AmeliaBooking\Domain\ValueObjects\String\Description; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class AbstractBookable * * @package AmeliaBooking\Domain\Entity\Bookable */ class AbstractBookable { /** @var Id */ private $id; /** @var Name */ protected $name; /** @var Description */ protected $description; /** @var Color */ protected $color; /** @var DepositType */ private $depositPayment; /** @var Price */ protected $deposit; /** @var BooleanValueObject */ protected $depositPerPerson; /** @var Price */ protected $price; /** @var Picture */ protected $picture; /** @var PositiveInteger */ protected $position; /** @var Collection */ private $extras; /** @var Collection */ private $coupons; /** @var Json */ private $settings; /** @var BooleanValueObject */ protected $fullPayment; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return Description */ public function getDescription() { return $this->description; } /** * @param Description $description */ public function setDescription(Description $description) { $this->description = $description; } /** * @return Color */ public function getColor() { return $this->color; } /** * @param Color $color */ public function setColor(Color $color) { $this->color = $color; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return Price */ public function getDeposit() { return $this->deposit; } /** * @param Price $deposit */ public function setDeposit(Price $deposit) { $this->deposit = $deposit; } /** * @return DepositType */ public function getDepositPayment() { return $this->depositPayment; } /** * @param DepositType $depositPayment */ public function setDepositPayment(DepositType $depositPayment) { $this->depositPayment = $depositPayment; } /** * @return BooleanValueObject */ public function getDepositPerPerson() { return $this->depositPerPerson; } /** * @param BooleanValueObject $depositPerPerson */ public function setDepositPerPerson(BooleanValueObject $depositPerPerson) { $this->depositPerPerson = $depositPerPerson; } /** * @return Picture */ public function getPicture() { return $this->picture; } /** * @param Picture $picture */ public function setPicture(Picture $picture) { $this->picture = $picture; } /** * @return PositiveInteger */ public function getPosition() { return $this->position; } /** * @param PositiveInteger $position */ public function setPosition($position) { $this->position = $position; } /** * @return Collection */ public function getExtras() { return $this->extras; } /** * @param Collection $extras */ public function setExtras(Collection $extras) { $this->extras = $extras; } /** * @return Collection */ public function getCoupons() { return $this->coupons; } /** * @param Collection $coupons */ public function setCoupons(Collection $coupons) { $this->coupons = $coupons; } /** * @return Json */ public function getSettings() { return $this->settings; } /** * @param Json $settings */ public function setSettings($settings) { $this->settings = $settings; } /** * @return BooleanValueObject */ public function getFullPayment() { return $this->fullPayment; } /** * @param BooleanValueObject $fullPayment */ public function setFullPayment(BooleanValueObject $fullPayment) { $this->fullPayment = $fullPayment; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'name' => null !== $this->getName() ? $this->getName()->getValue() : null, 'description' => null !== $this->getDescription() ? $this->getDescription()->getValue() : null, 'color' => null !== $this->getColor() ? $this->getColor()->getValue() : null, 'price' => $this->getPrice()->getValue(), 'deposit' => null !== $this->getDeposit() ? $this->getDeposit()->getValue() : null, 'depositPayment' => null !== $this->getDepositPayment() ? $this->getDepositPayment()->getValue() : null, 'depositPerPerson' => null !== $this->getDepositPerPerson() ? $this->getDepositPerPerson()->getValue() : null, 'pictureFullPath' => null !== $this->getPicture() ? $this->getPicture()->getFullPath() : null, 'pictureThumbPath' => null !== $this->getPicture() ? $this->getPicture()->getThumbPath() : null, 'extras' => $this->getExtras() ? $this->getExtras()->toArray() : [], 'coupons' => $this->getCoupons() ? $this->getCoupons()->toArray() : [], 'position' => null !== $this->getPosition() ? $this->getPosition()->getValue() : null, 'settings' => null !== $this->getSettings() ? $this->getSettings()->getValue() : null, 'fullPayment' => null !== $this->getFullPayment() ? $this->getFullPayment()->getValue() : null, ]; } } Cache/Cache.php 0000666 00000004036 15165376126 0007306 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Cache; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class Cache * * @package AmeliaBooking\Domain\Entity\Cache */ class Cache { /** @var Id */ private $id; /** @var Name */ private $name; /** @var Id */ private $paymentId; /** @var Json */ protected $data; /** * Cache constructor. * * @param Name $name */ public function __construct( Name $name ) { $this->name = $name; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName($name) { $this->name = $name; } /** * @return Id */ public function getPaymentId() { return $this->paymentId; } /** * @param Id $paymentId */ public function setPaymentId($paymentId) { $this->paymentId = $paymentId; } /** * @return Json */ public function getData() { return $this->data; } /** * @param Json $data */ public function setData(Json $data) { $this->data = $data; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'name' => $this->getName()->getValue(), 'paymentId' => $this->getPaymentId() ? $this->getPaymentId()->getValue() : null, 'data' => $this->getData() ? $this->getData()->getValue() : null, ]; } } Coupon/Coupon.php 0000666 00000017113 15165376126 0010006 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Coupon; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\DiscountFixedValue; use AmeliaBooking\Domain\ValueObjects\DiscountPercentageValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; use AmeliaBooking\Domain\ValueObjects\Number\Integer\WholeNumber; use AmeliaBooking\Domain\ValueObjects\String\CouponCode; use AmeliaBooking\Domain\ValueObjects\String\Status; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class Coupon * * @package AmeliaBooking\Domain\Entity\Coupon */ class Coupon { /** @var Id */ private $id; /** @var CouponCode */ private $code; /** @var DiscountPercentageValue */ private $discount; /** @var DiscountFixedValue */ private $deduction; /** @var PositiveInteger */ private $limit; /** @var WholeNumber */ private $customerLimit; /** @var WholeNumber */ private $used; /** @var WholeNumber */ private $notificationInterval; /** @var BooleanValueObject */ private $notificationRecurring; /** @var Status */ private $status; /** @var Collection */ private $serviceList; /** @var Collection */ private $eventList; /** @var Collection */ private $packageList; /** @var DateTimeValue */ private $expirationDate; /** * Coupon constructor. * * @param CouponCode $code * @param DiscountPercentageValue $discount * @param DiscountFixedValue $deduction * @param PositiveInteger $limit * @param Status $status */ public function __construct( CouponCode $code, DiscountPercentageValue $discount, DiscountFixedValue $deduction, PositiveInteger $limit, Status $status ) { $this->code = $code; $this->discount = $discount; $this->deduction = $deduction; $this->limit = $limit; $this->status = $status; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return CouponCode */ public function getCode() { return $this->code; } /** * @param CouponCode $code */ public function setCode(CouponCode $code) { $this->code = $code; } /** * @return DiscountPercentageValue */ public function getDiscount() { return $this->discount; } /** * @param DiscountPercentageValue $discount */ public function setDiscount(DiscountPercentageValue $discount) { $this->discount = $discount; } /** * @return DiscountFixedValue */ public function getDeduction() { return $this->deduction; } /** * @param DiscountFixedValue $deduction */ public function setDeduction(DiscountFixedValue $deduction) { $this->deduction = $deduction; } /** * @return PositiveInteger */ public function getLimit() { return $this->limit; } /** * @param PositiveInteger $limit */ public function setLimit($limit) { $this->limit = $limit; } /** * @return WholeNumber */ public function getCustomerLimit() { return $this->customerLimit; } /** * @param WholeNumber $customerLimit */ public function setCustomerLimit($customerLimit) { $this->customerLimit = $customerLimit; } /** * @return WholeNumber */ public function getUsed() { return $this->used; } /** * @param WholeNumber $used */ public function setUsed($used) { $this->used = $used; } /** * @return WholeNumber */ public function getNotificationInterval() { return $this->notificationInterval; } /** * @param WholeNumber $notificationInterval */ public function setNotificationInterval($notificationInterval) { $this->notificationInterval = $notificationInterval; } /** * @return BooleanValueObject */ public function getNotificationRecurring() { return $this->notificationRecurring; } /** * @param BooleanValueObject $notificationRecurring */ public function setNotificationRecurring($notificationRecurring) { $this->notificationRecurring = $notificationRecurring; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return Collection */ public function getServiceList() { return $this->serviceList; } /** * @param Collection $serviceList */ public function setServiceList(Collection $serviceList) { $this->serviceList = $serviceList; } /** * @return Collection */ public function getEventList() { return $this->eventList; } /** * @param Collection $eventList */ public function setEventList(Collection $eventList) { $this->eventList = $eventList; } /** * @return Collection */ public function getPackageList() { return $this->packageList; } /** * @param Collection $packageList */ public function setPackageList(Collection $packageList) { $this->packageList = $packageList; } /** * @return DateTimeValue */ public function getExpirationDate() { return $this->expirationDate; } /** * @param DateTimeValue $expirationDate */ public function setExpirationDate(DateTimeValue $expirationDate) { $this->expirationDate = $expirationDate; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'code' => $this->getCode()->getValue(), 'discount' => $this->getDiscount()->getValue(), 'deduction' => $this->getDeduction()->getValue(), 'limit' => $this->getLimit()->getValue(), 'customerLimit' => $this->getCustomerLimit()->getValue(), 'used' => $this->getUsed() ? $this->getUsed()->getValue() : 0, 'notificationInterval' => $this->getNotificationInterval() ? $this->getNotificationInterval()->getValue() : 0, 'notificationRecurring' => $this->getNotificationRecurring() ? $this->getNotificationRecurring()->getValue() : 0, 'status' => $this->getStatus()->getValue(), 'serviceList' => $this->getServiceList() ? $this->getServiceList()->toArray() : [], 'eventList' => $this->getEventList() ? $this->getEventList()->toArray() : [], 'packageList' => $this->getPackageList() ? $this->getPackageList()->toArray() : [], 'expirationDate' => $this->getExpirationDate() ? $this->getExpirationDate()->getValue()->format('Y-m-d') : null, ]; } } CustomField/CustomField.php 0000666 00000013027 15165376126 0011734 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\CustomField; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\String\CustomFieldType; use AmeliaBooking\Domain\ValueObjects\String\Label; /** * Class CustomField * * @package AmeliaBooking\Domain\Entity\CustomField */ class CustomField { /** @var Id */ private $id; /** @var Label */ private $label; /** @var CustomFieldType */ private $type; /** @var BooleanValueObject */ private $required; /** @var IntegerValue */ private $position; /** @var Json */ private $translations; /** @var Collection */ private $options; /** @var Collection */ private $services; /** @var Collection */ private $events; /** @var BooleanValueObject */ private $allServices; /** @var BooleanValueObject */ private $allEvents; /** * CustomField constructor. * * @param Label $label * @param CustomFieldType $type * @param BooleanValueObject $required * @param IntegerValue $position */ public function __construct( Label $label, CustomFieldType $type, BooleanValueObject $required, IntegerValue $position ) { $this->label = $label; $this->type = $type; $this->required = $required; $this->position = $position; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Label */ public function getLabel() { return $this->label; } /** * @param Label $label */ public function setLabel($label) { $this->label = $label; } /** * @return CustomFieldType */ public function getType() { return $this->type; } /** * @param CustomFieldType $type */ public function setType($type) { $this->type = $type; } /** * @return BooleanValueObject */ public function getRequired() { return $this->required; } /** * @param BooleanValueObject $required */ public function setRequired($required) { $this->required = $required; } /** * @return IntegerValue */ public function getPosition() { return $this->position; } /** * @param IntegerValue $position */ public function setPosition($position) { $this->position = $position; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return Collection */ public function getOptions() { return $this->options; } /** * @param Collection $options */ public function setOptions($options) { $this->options = $options; } /** * @return Collection */ public function getServices() { return $this->services; } /** * @param Collection $services */ public function setServices($services) { $this->services = $services; } /** * @return Collection */ public function getEvents() { return $this->events; } /** * @param Collection $events */ public function setEvents($events) { $this->events = $events; } /** * @return BooleanValueObject */ public function getAllServices() { return $this->allServices; } /** * @param BooleanValueObject $allServices */ public function setAllServices($allServices) { $this->allServices = $allServices; } /** * @return BooleanValueObject */ public function getAllEvents() { return $this->allEvents; } /** * @param BooleanValueObject $allEvents */ public function setAllEvents($allEvents) { $this->allEvents = $allEvents; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'label' => $this->getLabel()->getValue(), 'type' => $this->getType()->getValue(), 'required' => $this->getRequired()->getValue(), 'position' => $this->getPosition()->getValue(), 'options' => $this->getOptions() ? $this->getOptions()->toArray() : [], 'services' => $this->getServices() ? $this->getServices()->toArray() : [], 'events' => $this->getEvents() ? $this->getEvents()->toArray() : [], 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, 'allServices' => $this->getAllServices() ? $this->getAllServices()->getValue() : null, 'allEvents' => $this->getAllEvents() ? $this->getAllEvents()->getValue() : null, ]; } } CustomField/CustomFieldOption.php 0000666 00000005534 15165376126 0013131 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\CustomField; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\String\Label; /** * Class CustomFieldOption * * @package AmeliaBooking\Domain\Entity\CustomField */ class CustomFieldOption { /** @var Id */ private $id; /** @var Id */ private $customFieldId; /** @var Label */ private $label; /** @var IntegerValue */ private $position; /** @var Json */ private $translations; /** * CustomFieldOption constructor. * * @param Id $customFieldId * @param Label $label * @param IntegerValue $position */ public function __construct(Id $customFieldId, Label $label, IntegerValue $position) { $this->customFieldId = $customFieldId; $this->label = $label; $this->position = $position; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Id */ public function getCustomFieldId() { return $this->customFieldId; } /** * @param Id $customFieldId */ public function setCustomFieldId($customFieldId) { $this->customFieldId = $customFieldId; } /** * @return Label */ public function getLabel() { return $this->label; } /** * @param Label $label */ public function setLabel($label) { $this->label = $label; } /** * @return IntegerValue */ public function getPosition() { return $this->position; } /** * @param IntegerValue $position */ public function setPosition($position) { $this->position = $position; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'customFieldId' => $this->getCustomFieldId()->getValue(), 'label' => $this->getLabel()->getValue(), 'position' => $this->getPosition()->getValue(), 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, ]; } } Booking/Event/EventPeriod.php 0000666 00000011744 15165376126 0012201 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\Entity\Zoom\ZoomMeeting; use AmeliaBooking\Domain\ValueObjects\String\Token; use AmeliaBooking\Domain\ValueObjects\String\Label; /** * Class EventPeriod * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class EventPeriod { /** @var Id */ private $id; /** @var Id */ private $eventId; /** @var DateTimeValue */ protected $periodStart; /** @var DateTimeValue */ protected $periodEnd; /** @var ZoomMeeting */ private $zoomMeeting; /** @var string */ private $lessonSpace; /** @var Collection */ protected $bookings; /** @var Token */ private $googleCalendarEventId; /** @var string */ private $googleMeetUrl; /** @var Label */ private $outlookCalendarEventId; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getEventId() { return $this->eventId; } /** * @param Id $eventId */ public function setEventId(Id $eventId) { $this->eventId = $eventId; } /** * @return DateTimeValue */ public function getPeriodStart() { return $this->periodStart; } /** * @param DateTimeValue $periodStart */ public function setPeriodStart(DateTimeValue $periodStart) { $this->periodStart = $periodStart; } /** * @return DateTimeValue */ public function getPeriodEnd() { return $this->periodEnd; } /** * @param DateTimeValue $periodEnd */ public function setPeriodEnd(DateTimeValue $periodEnd) { $this->periodEnd = $periodEnd; } /** * @return ZoomMeeting */ public function getZoomMeeting() { return $this->zoomMeeting; } /** * @param ZoomMeeting $zoomMeeting */ public function setZoomMeeting(ZoomMeeting $zoomMeeting) { $this->zoomMeeting = $zoomMeeting; } /** * @return string */ public function getLessonSpace() { return $this->lessonSpace; } /** * @param string $lessonSpace */ public function setLessonSpace($lessonSpace) { $this->lessonSpace = $lessonSpace; } /** * @return Collection */ public function getBookings() { return $this->bookings; } /** * @param Collection $bookings */ public function setBookings(Collection $bookings) { $this->bookings = $bookings; } /** * @return Token */ public function getGoogleCalendarEventId() { return $this->googleCalendarEventId; } /** * @param Token $googleCalendarEventId */ public function setGoogleCalendarEventId($googleCalendarEventId) { $this->googleCalendarEventId = $googleCalendarEventId; } /** * @return string */ public function getGoogleMeetUrl() { return $this->googleMeetUrl; } /** * @param string $googleMeetUrl */ public function setGoogleMeetUrl($googleMeetUrl) { $this->googleMeetUrl = $googleMeetUrl; } /** * @return Label */ public function getOutlookCalendarEventId() { return $this->outlookCalendarEventId; } /** * @param Label $outlookCalendarEventId */ public function setOutlookCalendarEventId($outlookCalendarEventId) { $this->outlookCalendarEventId = $outlookCalendarEventId; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null, 'periodStart' => $this->getPeriodStart()->getValue()->format('Y-m-d H:i:s'), 'periodEnd' => $this->getPeriodEnd()->getValue()->format('Y-m-d H:i:s'), 'zoomMeeting' => $this->getZoomMeeting() ? $this->getZoomMeeting()->toArray() : null, 'lessonSpace' => $this->getLessonSpace() ?: null, 'bookings' => $this->getBookings() ? $this->getBookings()->toArray() : [], 'googleCalendarEventId' => $this->getGoogleCalendarEventId() ? $this->getGoogleCalendarEventId()->getValue(): null, 'googleMeetUrl' => $this->getGoogleMeetUrl(), 'outlookCalendarEventId' => $this->getOutlookCalendarEventId() ? $this->getOutlookCalendarEventId()->getValue() : null ]; } } Booking/Event/CustomerBookingEventPeriod.php 0000666 00000003311 15165376126 0015223 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class CustomerBookingEventPeriod * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class CustomerBookingEventPeriod { /** @var Id */ private $id; /** @var Id */ private $customerBookingId; /** @var Id */ protected $eventPeriodId; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getEventPeriodId() { return $this->eventPeriodId; } /** * @param Id $eventPeriodId */ public function setEventPeriodId(Id $eventPeriodId) { $this->eventPeriodId = $eventPeriodId; } /** * @return Id */ public function getCustomerBookingId() { return $this->customerBookingId; } /** * @param Id $customerBookingId */ public function setCustomerBookingId(Id $customerBookingId) { $this->customerBookingId = $customerBookingId; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'eventPeriodId' => $this->getEventPeriodId() ? $this->getEventPeriodId()->getValue() : null, 'customerBookingId' => $this->getCustomerBookingId() ? $this->getCustomerBookingId()->getValue() : null ]; } } Booking/Event/EventTag.php 0000666 00000003005 15165376126 0011461 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class EventTag * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class EventTag { /** @var Id */ private $id; /** @var Id */ private $eventId; /** @var Name */ protected $name; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getEventId() { return $this->eventId; } /** * @param Id $eventId */ public function setEventId(Id $eventId) { $this->eventId = $eventId; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null, 'name' => $this->getName() ? $this->getName()->getValue() : null, ]; } } Booking/Event/CustomerBookingEventTicket.php 0000666 00000005151 15165376126 0015230 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; /** * Class CustomerBookingEventTicket * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class CustomerBookingEventTicket { /** @var Id */ private $id; /** @var Id */ private $customerBookingId; /** @var Id */ protected $eventTicketId; /** @var IntegerValue */ protected $persons; /** @var Price */ protected $price; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Id */ public function getCustomerBookingId() { return $this->customerBookingId; } /** * @param Id $customerBookingId */ public function setCustomerBookingId(Id $customerBookingId) { $this->customerBookingId = $customerBookingId; } /** * @return Id */ public function getEventTicketId() { return $this->eventTicketId; } /** * @param Id $eventTicketId */ public function setEventTicketId(Id $eventTicketId) { $this->eventTicketId = $eventTicketId; } /** * @return IntegerValue */ public function getPersons() { return $this->persons; } /** * @param IntegerValue $persons */ public function setPersons(IntegerValue $persons) { $this->persons = $persons; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'eventTicketId' => $this->getEventTicketId() ? $this->getEventTicketId()->getValue() : null, 'customerBookingId' => $this->getCustomerBookingId() ? $this->getCustomerBookingId()->getValue() : null, 'persons' => $this->getPersons() ? $this->getPersons()->getValue() : null, 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null ]; } } Booking/Event/EventTicket.php 0000666 00000011063 15165376126 0012174 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; /** * Class EventTicket * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class EventTicket { /** @var Id */ private $id; /** @var Id */ private $eventId; /** @var Name */ protected $name; /** @var BooleanValueObject */ private $enabled; /** @var Price */ protected $price; /** @var Price */ protected $dateRangePrice; /** @var IntegerValue */ private $spots; /** @var Json */ protected $dateRanges; /** @var IntegerValue */ private $sold; /** @var Json */ protected $translations; /** * @return Json */ public function getDateRanges() { return $this->dateRanges; } /** * @param Json $dateRanges */ public function setDateRanges($dateRanges) { $this->dateRanges = $dateRanges; } /** * @return IntegerValue */ public function getSpots() { return $this->spots; } /** * @param IntegerValue $spots */ public function setSpots($spots) { $this->spots = $spots; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice($price) { $this->price = $price; } /** * @return Price */ public function getDateRangePrice() { return $this->dateRangePrice; } /** * @param Price $dateRangePrice */ public function setDateRangePrice($dateRangePrice) { $this->dateRangePrice = $dateRangePrice; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName($name) { $this->name = $name; } /** * @return BooleanValueObject */ public function getEnabled() { return $this->enabled; } /** * @param BooleanValueObject $enabled */ public function setEnabled($enabled) { $this->enabled = $enabled; } /** * @return Id */ public function getEventId() { return $this->eventId; } /** * @param Id $eventId */ public function setEventId($eventId) { $this->eventId = $eventId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return IntegerValue */ public function getSold() { return $this->sold; } /** * @param IntegerValue $sold */ public function setSold($sold) { $this->sold = $sold; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return [ 'id' => $this->getId() ? $this->getId()->getValue() : null, 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null, 'name' => $this->getName() ? $this->getName()->getValue() : null, 'enabled' => $this->getEnabled() ? $this->getEnabled()->getValue() : null, 'price' => $this->getPrice() ? $this->getPrice()->getValue() : null, 'dateRangePrice' => $this->getDateRangePrice() ? $this->getDateRangePrice()->getValue() : null, 'spots' => $this->getSpots() ? $this->getSpots()->getValue() : null, 'dateRanges' => $this->getDateRanges() ? $this->getDateRanges()->getValue() : null, 'sold' => $this->getSold() ? $this->getSold()->getValue() : 0, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, ]; } } Booking/Event/Event.php 0000666 00000042041 15165376126 0011030 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Event; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Bookable\AbstractBookable; use AmeliaBooking\Domain\Entity\Entities; use AmeliaBooking\Domain\Entity\Location\Location; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\Recurring; use AmeliaBooking\Domain\ValueObjects\String\BookingStatus; use AmeliaBooking\Domain\ValueObjects\String\BookingType; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\Json; /** * Class Event * * @package AmeliaBooking\Domain\Entity\Booking\Event */ class Event extends AbstractBookable { /** @var Id */ protected $parentId; /** @var BookingStatus */ protected $status; /** @var Collection */ protected $bookings; /** @var DateTimeValue */ protected $bookingOpens; /** @var DateTimeValue */ protected $bookingCloses; /** @var string */ protected $bookingOpensRec; /** @var string */ protected $bookingClosesRec; /** @var string */ protected $ticketRangeRec; /** @var Recurring */ private $recurring; /** @var IntegerValue */ private $maxCapacity; /** @var BooleanValueObject */ private $show; /** @var Collection */ protected $periods; /** @var Collection */ private $tags; /** @var Collection */ private $gallery; /** @var Collection */ private $providers; /** @var bool */ protected $notifyParticipants; /** @var Id */ protected $locationId; /** @var Location */ private $location; /** @var Name */ protected $customLocation; /** @var DateTimeValue */ protected $created; /** @var Name */ private $zoomUserId; /** @var Id */ private $organizerId; /** @var BooleanValueObject */ private $bringingAnyone; /** @var BooleanValueObject */ private $bookMultipleTimes; /** @var Json */ protected $translations; /** @var Collection */ private $customTickets; /** @var BooleanValueObject */ private $customPricing; /** @var IntegerValue */ private $maxCustomCapacity; /** @var IntegerValue */ private $closeAfterMin; /** @var BooleanValueObject */ private $closeAfterMinBookings; /** @var BooleanValueObject */ private $aggregatedPrice; /** @var IntegerValue */ private $maxExtraPeople; /** @var DateTimeValue */ private $initialEventStart; /** @var DateTimeValue */ private $initialEventEnd; /** * @return Id */ public function getParentId() { return $this->parentId; } /** * @param Id $parentId */ public function setParentId(Id $parentId) { $this->parentId = $parentId; } /** * @return Recurring */ public function getRecurring() { return $this->recurring; } /** * @param Recurring $recurring */ public function setRecurring(Recurring $recurring) { $this->recurring = $recurring; } /** * @return IntegerValue */ public function getMaxCapacity() { return $this->maxCapacity; } /** * @param IntegerValue $maxCapacity */ public function setMaxCapacity(IntegerValue $maxCapacity) { $this->maxCapacity = $maxCapacity; } /** * @return BooleanValueObject */ public function getShow() { return $this->show; } /** * @param BooleanValueObject $show */ public function setShow(BooleanValueObject $show) { $this->show = $show; } /** * @return Collection */ public function getBookings() { return $this->bookings; } /** * @param Collection $bookings */ public function setBookings(Collection $bookings) { $this->bookings = $bookings; } /** * @return Collection */ public function getPeriods() { return $this->periods; } /** * @param Collection $periods */ public function setPeriods(Collection $periods) { $this->periods = $periods; } /** * @return DateTimeValue */ public function getBookingOpens() { return $this->bookingOpens; } /** * @param DateTimeValue|null $bookingOpens */ public function setBookingOpens(DateTimeValue $bookingOpens = null) { $this->bookingOpens = $bookingOpens; } /** * @return DateTimeValue */ public function getBookingCloses() { return $this->bookingCloses; } /** * @param DateTimeValue|null $bookingCloses */ public function setBookingCloses(DateTimeValue $bookingCloses = null) { $this->bookingCloses = $bookingCloses; } /** * @return string */ public function getBookingOpensRec() { return $this->bookingOpensRec; } /** * @param string $bookingOpensRec */ public function setBookingOpensRec($bookingOpensRec) { $this->bookingOpensRec = $bookingOpensRec; } /** * @return string */ public function getBookingClosesRec() { return $this->bookingClosesRec; } /** * @param string $bookingClosesRec */ public function setBookingClosesRec($bookingClosesRec) { $this->bookingClosesRec = $bookingClosesRec; } /** * @return string */ public function getTicketRangeRec() { return $this->ticketRangeRec; } /** * @param string $ticketRangeRec */ public function setTicketRangeRec($ticketRangeRec) { $this->ticketRangeRec = $ticketRangeRec; } /** * @return BookingStatus */ public function getStatus() { return $this->status; } /** * @param BookingStatus $status */ public function setStatus(BookingStatus $status) { $this->status = $status; } /** * @return Collection */ public function getCustomTickets() { return $this->customTickets; } /** * @param Collection $customTickets */ public function setCustomTickets(Collection $customTickets) { $this->customTickets = $customTickets; } /** * @return Collection */ public function getTags() { return $this->tags; } /** * @param Collection $tags */ public function setTags(Collection $tags) { $this->tags = $tags; } /** * @return Collection */ public function getGallery() { return $this->gallery; } /** * @param Collection $gallery */ public function setGallery(Collection $gallery) { $this->gallery = $gallery; } /** * @return Collection */ public function getProviders() { return $this->providers; } /** * @param Collection $providers */ public function setProviders(Collection $providers) { $this->providers = $providers; } /** * @return bool */ public function isNotifyParticipants() { return $this->notifyParticipants; } /** * @param bool $notifyParticipants */ public function setNotifyParticipants($notifyParticipants) { $this->notifyParticipants = $notifyParticipants; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Location */ public function getLocation() { return $this->location; } /** * @param Location $location */ public function setLocation(Location $location) { $this->location = $location; } /** * @return Name */ public function getCustomLocation() { return $this->customLocation; } /** * @param Name $customLocation */ public function setCustomLocation(Name $customLocation) { $this->customLocation = $customLocation; } /** * @return DateTimeValue */ public function getCreated() { return $this->created; } /** * @param DateTimeValue $created */ public function setCreated(DateTimeValue $created) { $this->created = $created; } /** * @return Name */ public function getZoomUserId() { return $this->zoomUserId; } /** * @param Name $zoomUserId */ public function setZoomUserId(Name $zoomUserId) { $this->zoomUserId = $zoomUserId; } /** * @return Id */ public function getOrganizerId() { return $this->organizerId; } /** * @param Id $organizerId */ public function setOrganizerId($organizerId) { $this->organizerId = $organizerId; } /** * @return BookingType */ public function getType() { return new Bookingtype(Entities::EVENT); } /** * @return BooleanValueObject */ public function getBringingAnyone() { return $this->bringingAnyone; } /** * @param BooleanValueObject $bringingAnyone */ public function setBringingAnyone(BooleanValueObject $bringingAnyone) { $this->bringingAnyone = $bringingAnyone; } /** * @return BooleanValueObject */ public function getBookMultipleTimes() { return $this->bookMultipleTimes; } /** * @param BooleanValueObject $bookMultipleTimes */ public function setBookMultipleTimes(BooleanValueObject $bookMultipleTimes) { $this->bookMultipleTimes = $bookMultipleTimes; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return BooleanValueObject */ public function getCustomPricing() { return $this->customPricing; } /** * @param BooleanValueObject $customPricing */ public function setCustomPricing($customPricing) { $this->customPricing = $customPricing; } /** * @return IntegerValue */ public function getMaxCustomCapacity() { return $this->maxCustomCapacity; } /** * @param IntegerValue $maxCustomCapacity */ public function setMaxCustomCapacity($maxCustomCapacity) { $this->maxCustomCapacity = $maxCustomCapacity; } /** * @return IntegerValue */ public function getCloseAfterMin() { return $this->closeAfterMin; } /** * @param IntegerValue $closeAfterMin */ public function setCloseAfterMin($closeAfterMin) { $this->closeAfterMin = $closeAfterMin; } /** * @return BooleanValueObject */ public function getCloseAfterMinBookings() { return $this->closeAfterMinBookings; } /** * @param BooleanValueObject $closeAfterMinBookings */ public function setCloseAfterMinBookings($closeAfterMinBookings) { $this->closeAfterMinBookings = $closeAfterMinBookings; } /** * @return IntegerValue */ public function getMaxExtraPeople() { return $this->maxExtraPeople; } /** * @return DateTimeValue|null */ public function getInitialEventStart() { return $this->initialEventStart; } /** * @param DateTimeValue|null $initialEventStart */ public function setInitialEventStart(DateTimeValue $initialEventStart) { $this->initialEventStart = $initialEventStart; } /** * @return DateTimeValue|null */ public function getInitialEventEnd() { return $this->initialEventEnd; } /** * @param DateTimeValue|null $initialEventEnd */ public function setInitialEventEnd(DateTimeValue $initialEventEnd) { $this->initialEventEnd = $initialEventEnd; } /** * @param IntegerValue $maxExtraPeople */ public function setMaxExtraPeople($maxExtraPeople) { $this->maxExtraPeople = $maxExtraPeople; } /** * @return BooleanValueObject */ public function getAggregatedPrice() { return $this->aggregatedPrice; } /** * @param BooleanValueObject $aggregatedPrice */ public function setAggregatedPrice($aggregatedPrice) { $this->aggregatedPrice = $aggregatedPrice; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'bookings' => $this->getBookings() ? $this->getBookings()->toArray() : [], 'periods' => $this->getPeriods()->toArray(), 'bookingOpens' => $this->getBookingOpens() ? $this->getBookingOpens()->getValue()->format('Y-m-d H:i:s') : null, 'bookingCloses' => $this->getBookingCloses() ? $this->getBookingCloses()->getValue()->format('Y-m-d H:i:s') : null, 'bookingOpensRec' => $this->getBookingOpensRec(), 'bookingClosesRec' => $this->getBookingClosesRec(), 'ticketRangeRec' => $this->getTicketRangeRec(), 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, 'recurring' => $this->getRecurring() ? $this->getRecurring()->toArray() : null, 'maxCapacity' => $this->getMaxCapacity() ? $this->getMaxCapacity()->getValue() : null, 'maxCustomCapacity' => $this->getMaxCustomCapacity() ? $this->getMaxCustomCapacity()->getValue() : null, 'show' => $this->getShow() ? $this->getShow()->getValue() : null, 'tags' => $this->getTags() ? $this->getTags()->toArray() : null, 'customTickets' => $this->getCustomTickets() ? $this->getCustomTickets()->toArray() : [], 'gallery' => $this->getGallery() ? $this->getGallery()->toArray() : [], 'providers' => $this->getProviders() ? $this->getProviders()->toArray() : [], 'notifyParticipants' => $this->isNotifyParticipants(), 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null, 'location' => $this->getLocation() ? $this->getLocation()->toArray() : null, 'customLocation' => $this->getCustomLocation() ? $this->getCustomLocation()->getValue() : null, 'parentId' => $this->getParentId() ? $this->getParentId()->getValue() : null, 'created' => $this->getCreated() ? $this->getCreated()->getValue()->format('Y-m-d H:i:s') : null, 'zoomUserId' => $this->getZoomUserId() ? $this->getZoomUserId()->getValue() : null, 'organizerId' => $this->getOrganizerId() ? $this->getOrganizerId()->getValue() : null, 'type' => $this->getType()->getValue(), 'bringingAnyone' => $this->getBringingAnyone() ? $this->getBringingAnyone()->getValue() : null, 'bookMultipleTimes' => $this->getBookMultipleTimes() ? $this->getBookMultipleTimes()->getValue() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, 'customPricing' => $this->getCustomPricing() ? $this->getCustomPricing()->getValue() : null, 'closeAfterMin' => $this->getCloseAfterMin() ? $this->getCloseAfterMin()->getValue() : null, 'closeAfterMinBookings' => $this->getCloseAfterMinBookings() ? $this->getCloseAfterMinBookings()->getValue() : null, 'maxExtraPeople' => $this->getMaxExtraPeople() ? $this->getMaxExtraPeople()->getValue() : null, 'initialEventStart' => $this->getInitialEventStart() ? $this->getInitialEventStart()->getValue()->format('Y-m-d H:i:s') : null, 'initialEventEnd' => $this->getInitialEventEnd() ? $this->getInitialEventEnd()->getValue()->format('Y-m-d H:i:s') : null, 'aggregatedPrice' => $this->getAggregatedPrice() ? $this->getAggregatedPrice()->getValue() : null, ] ); } } Booking/Appointment/CustomerBooking.php 0000666 00000020550 15165376126 0014277 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Appointment; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Bookable\Service\PackageCustomerService; use AmeliaBooking\Domain\Entity\Booking\AbstractCustomerBooking; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\PositiveDuration; use AmeliaBooking\Domain\ValueObjects\String\BookingStatus; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\IntegerValue; use AmeliaBooking\Domain\ValueObjects\String\Token; /** * Class CustomerBooking * * @package AmeliaBooking\Domain\Entity\Booking\Appointment */ class CustomerBooking extends AbstractCustomerBooking { /** @var Id */ private $appointmentId; /** @var IntegerValue */ private $persons; /** @var Collection */ private $payments; /** @var Collection */ private $ticketsBooking; /** @var Token */ private $token; /** @var IntegerValue */ private $utcOffset; /** @var BooleanValueObject */ protected $aggregatedPrice; /** @var BooleanValueObject */ protected $isChangedStatus; /** @var PackageCustomerService */ protected $packageCustomerService; /** @var BooleanValueObject */ protected $deposit; /** @var BooleanValueObject */ protected $isLastBooking; /** @var PositiveDuration */ private $duration; /** @var DateTimeValue */ private $created; /** @var BooleanValueObject */ private $actionsCompleted; /** @var BooleanValueObject */ private $isUpdated; /** * CustomerBooking constructor. * * @param Id $customerId * @param BookingStatus $status * @param IntegerValue $persons */ public function __construct( Id $customerId, BookingStatus $status, IntegerValue $persons ) { parent::__construct($customerId, $status); $this->persons = $persons; } /** * @return Id */ public function getAppointmentId() { return $this->appointmentId; } /** * @param Id $appointmentId */ public function setAppointmentId(Id $appointmentId) { $this->appointmentId = $appointmentId; } /** * @return IntegerValue */ public function getPersons() { return $this->persons; } /** * @param IntegerValue $persons */ public function setPersons(IntegerValue $persons) { $this->persons = $persons; } /** * @return Collection */ public function getPayments() { return $this->payments; } /** * @param Collection $payments */ public function setPayments(Collection $payments) { $this->payments = $payments; } /** * @return Token */ public function getToken() { return $this->token; } /** * @param Token $token */ public function setToken(Token $token) { $this->token = $token; } /** * @return IntegerValue */ public function getUtcOffset() { return $this->utcOffset; } /** * @param IntegerValue $utcOffset */ public function setUtcOffset(IntegerValue $utcOffset) { $this->utcOffset = $utcOffset; } /** * @return BooleanValueObject */ public function getAggregatedPrice() { return $this->aggregatedPrice; } /** * @param BooleanValueObject $aggregatedPrice */ public function setAggregatedPrice(BooleanValueObject $aggregatedPrice) { $this->aggregatedPrice = $aggregatedPrice; } /** * @return BooleanValueObject */ public function isChangedStatus() { return $this->isChangedStatus; } /** * @param BooleanValueObject $isChangedStatus */ public function setChangedStatus(BooleanValueObject $isChangedStatus) { $this->isChangedStatus = $isChangedStatus; } /** * @return PackageCustomerService */ public function getPackageCustomerService() { return $this->packageCustomerService; } /** * @param PackageCustomerService $packageCustomerService */ public function setPackageCustomerService(PackageCustomerService $packageCustomerService) { $this->packageCustomerService = $packageCustomerService; } /** * @return BooleanValueObject */ public function getDeposit() { return $this->deposit; } /** * @param BooleanValueObject $deposit */ public function setDeposit(BooleanValueObject $deposit) { $this->deposit = $deposit; } /** * @return BooleanValueObject */ public function isLastBooking() { return $this->isLastBooking; } /** * @param BooleanValueObject $isLastBooking */ public function setLastBooking($isLastBooking) { $this->isLastBooking = $isLastBooking; } /** * @return Collection */ public function getTicketsBooking() { return $this->ticketsBooking; } /** * @param Collection $ticketsBooking */ public function setTicketsBooking(Collection $ticketsBooking) { $this->ticketsBooking = $ticketsBooking; } /** * @return PositiveDuration */ public function getDuration() { return $this->duration; } /** * @param PositiveDuration $duration */ public function setDuration(PositiveDuration $duration) { $this->duration = $duration; } /** * @return DateTimeValue */ public function getCreated() { return $this->created; } /** * @param DateTimeValue $created */ public function setCreated($created) { $this->created = $created; } /** * @return BooleanValueObject */ public function getActionsCompleted() { return $this->actionsCompleted; } /** * @param BooleanValueObject $actionsCompleted */ public function setActionsCompleted($actionsCompleted) { $this->actionsCompleted = $actionsCompleted; } /** * @return BooleanValueObject|null */ public function isUpdated() { return $this->isUpdated; } /** * @param BooleanValueObject $isUpdated */ public function setUpdated(BooleanValueObject $isUpdated) { $this->isUpdated = $isUpdated; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'appointmentId' => null !== $this->getAppointmentId() ? $this->getAppointmentId()->getValue() : null, 'persons' => $this->getPersons()->getValue(), 'token' => $this->getToken() ? $this->getToken()->getValue() : null, 'payments' => null !== $this->getPayments() ? $this->getPayments()->toArray() : null, 'utcOffset' => null !== $this->getUtcOffset() ? $this->getUtcOffset()->getValue() : null, 'aggregatedPrice' => $this->getAggregatedPrice() ? $this->getAggregatedPrice()->getValue() : null, 'isChangedStatus' => $this->isChangedStatus() ? $this->isChangedStatus()->getValue() : null, 'isLastBooking' => $this->isLastBooking() ? $this->isLastBooking()->getValue() : null, 'packageCustomerService' => $this->getPackageCustomerService() ? $this->getPackageCustomerService()->toArray() : null, 'ticketsData' => null !== $this->getTicketsBooking() ? $this->getTicketsBooking()->toArray() : null, 'duration' => $this->getDuration() ? $this->getDuration()->getValue() : null, 'created' => $this->getCreated() ? $this->getCreated()->getValue()->format('Y-m-d H:i:s') : null, 'actionsCompleted' => $this->getActionsCompleted() ? $this->getActionsCompleted()->getValue() : null, 'isUpdated' => $this->isUpdated() ? $this->isUpdated()->getValue() : null, ] ); } } Booking/Appointment/Appointment.php 0000666 00000023110 15165376126 0013456 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Appointment; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Bookable\Service\Service; use AmeliaBooking\Domain\Entity\Booking\AbstractBooking; use AmeliaBooking\Domain\Entity\Entities; use AmeliaBooking\Domain\Entity\Location\Location; use AmeliaBooking\Domain\Entity\User\Provider; use AmeliaBooking\Domain\Entity\Zoom\ZoomMeeting; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\BookingType; use AmeliaBooking\Domain\ValueObjects\String\Label; use AmeliaBooking\Domain\ValueObjects\String\Token; /** * Class Appointment * * @package AmeliaBooking\Domain\Entity\Booking\Appointment */ class Appointment extends AbstractBooking { /** @var Id */ private $parentId; /** @var Id */ private $serviceId; /** @var Service */ private $service; /** @var Id */ private $providerId; /** @var Provider */ private $provider; /** @var Id */ private $locationId; /** @var Location */ private $location; /** @var Token */ private $googleCalendarEventId; /** @var string */ private $googleMeetUrl; /** @var Label */ private $outlookCalendarEventId; /** @var DateTimeValue */ protected $bookingStart; /** @var DateTimeValue */ protected $bookingEnd; /** @var ZoomMeeting */ private $zoomMeeting; /** @var string */ private $lessonSpace; /** @var Collection */ private $resources; /** @var BooleanValueObject */ protected $isRescheduled; /** @var BooleanValueObject */ protected $isFull; /** * Appointment constructor. * * @param DateTimeValue $bookingStart * @param DateTimeValue $bookingEnd * @param bool $notifyParticipants * @param Id $serviceId * @param Id $providerId */ public function __construct( DateTimeValue $bookingStart, DateTimeValue $bookingEnd, $notifyParticipants, Id $serviceId, Id $providerId ) { parent::__construct($notifyParticipants); $this->bookingStart = $bookingStart; $this->bookingEnd = $bookingEnd; $this->serviceId = $serviceId; $this->providerId = $providerId; $this->resources = new Collection(); } /** * @return Id */ public function getServiceId() { return $this->serviceId; } /** * @param Id $serviceId */ public function setServiceId(Id $serviceId) { $this->serviceId = $serviceId; } /** * @return Service */ public function getService() { return $this->service; } /** * @param Service $service */ public function setService(Service $service) { $this->service = $service; } /** * @return Id */ public function getProviderId() { return $this->providerId; } /** * @param Id $providerId */ public function setProviderId(Id $providerId) { $this->providerId = $providerId; } /** * @return Provider */ public function getProvider() { return $this->provider; } /** * @param Provider $provider */ public function setProvider(Provider $provider) { $this->provider = $provider; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Location */ public function getLocation() { return $this->location; } /** * @param Location $location */ public function setLocation(Location $location) { $this->location = $location; } /** * @return Token */ public function getGoogleCalendarEventId() { return $this->googleCalendarEventId; } /** * @param Token $googleCalendarEventId */ public function setGoogleCalendarEventId($googleCalendarEventId) { $this->googleCalendarEventId = $googleCalendarEventId; } /** * @return string */ public function getGoogleMeetUrl() { return $this->googleMeetUrl; } /** * @param string $googleMeetUrl */ public function setGoogleMeetUrl($googleMeetUrl) { $this->googleMeetUrl = $googleMeetUrl; } /** * @return Label */ public function getOutlookCalendarEventId() { return $this->outlookCalendarEventId; } /** * @param Label $outlookCalendarEventId */ public function setOutlookCalendarEventId($outlookCalendarEventId) { $this->outlookCalendarEventId = $outlookCalendarEventId; } /** * @return DateTimeValue */ public function getBookingStart() { return $this->bookingStart; } /** * @param DateTimeValue $bookingStart */ public function setBookingStart(DateTimeValue $bookingStart) { $this->bookingStart = $bookingStart; } /** * @return DateTimeValue */ public function getBookingEnd() { return $this->bookingEnd; } /** * @param DateTimeValue $bookingEnd */ public function setBookingEnd(DateTimeValue $bookingEnd) { $this->bookingEnd = $bookingEnd; } /** * @return BookingType */ public function getType() { return new Bookingtype(Entities::APPOINTMENT); } /** * @return ZoomMeeting */ public function getZoomMeeting() { return $this->zoomMeeting; } /** * @param ZoomMeeting $zoomMeeting */ public function setZoomMeeting(ZoomMeeting $zoomMeeting) { $this->zoomMeeting = $zoomMeeting; } /** * @return string */ public function getLessonSpace() { return $this->lessonSpace; } /** * @param string $lessonSpace */ public function setLessonSpace($lessonSpace) { $this->lessonSpace = $lessonSpace; } /** * @return Id */ public function getParentId() { return $this->parentId; } /** * @param Id $parentId */ public function setParentId(Id $parentId) { $this->parentId = $parentId; } /** * @return BooleanValueObject */ public function isRescheduled() { return $this->isRescheduled; } /** * @param BooleanValueObject $isRescheduled */ public function setRescheduled(BooleanValueObject $isRescheduled) { $this->isRescheduled = $isRescheduled; } /** * @return BooleanValueObject */ public function isFull() { return $this->isFull; } /** * @param BooleanValueObject $isFull */ public function setFull(BooleanValueObject $isFull) { $this->isFull = $isFull; } /** * @return Collection */ public function getResources() { return $this->resources; } /** * @param Collection $resources */ public function setResources(Collection $resources) { $this->resources = $resources; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'serviceId' => $this->getServiceId()->getValue(), 'parentId' => $this->getParentId() ? $this->getParentId()->getValue() : null, 'providerId' => $this->getProviderId()->getValue(), 'locationId' => null !== $this->getLocationId() ? $this->getLocationId()->getValue() : null, 'provider' => null !== $this->getProvider() ? $this->getProvider()->toArray() : null, 'service' => null !== $this->getService() ? $this->getService()->toArray() : null, 'location' => null !== $this->getLocation() ? $this->getLocation()->toArray() : null, 'googleCalendarEventId' => null !== $this->getGoogleCalendarEventId() ? $this->getGoogleCalendarEventId()->getValue() : null, 'googleMeetUrl' => null !== $this->getGoogleMeetUrl() ? $this->getGoogleMeetUrl() : null, 'outlookCalendarEventId' => null !== $this->getOutlookCalendarEventId() ? $this->getOutlookCalendarEventId()->getValue() : null, 'zoomMeeting' => $this->getZoomMeeting() ? $this->getZoomMeeting()->toArray() : null, 'lessonSpace' => $this->getLessonSpace() ?: null, 'bookingStart' => $this->getBookingStart()->getValue()->format('Y-m-d H:i:s'), 'bookingEnd' => $this->getBookingEnd()->getValue()->format('Y-m-d H:i:s'), 'type' => $this->getType()->getValue(), 'isRescheduled' => $this->isRescheduled() ? $this->isRescheduled()->getValue() : null, 'isFull' => $this->isFull() ? $this->isFull()->getValue() : null, 'resources' => $this->getResources()->toArray(), ] ); } } Booking/Appointment/CustomerBookingExtra.php 0000666 00000006700 15165376126 0015304 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking\Appointment; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Number\Integer\PositiveInteger; /** * Class CustomerBookingExtra * * @package AmeliaBooking\Domain\Entity\Booking\Appointment */ class CustomerBookingExtra { /** @var Id */ private $id; /** @var Id */ private $customerBookingId; /** @var Id */ private $extraId; /** @var PositiveInteger */ private $quantity; /** @var Price */ protected $price; /** @var BooleanValueObject */ protected $aggregatedPrice; /** * CustomerBookingExtra constructor. * * @param Id $extraId * @param PositiveInteger $quantity */ public function __construct( Id $extraId, PositiveInteger $quantity ) { $this->extraId = $extraId; $this->quantity = $quantity; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getCustomerBookingId() { return $this->customerBookingId; } /** * @param Id $customerBookingId */ public function setCustomerBookingId(Id $customerBookingId) { $this->customerBookingId = $customerBookingId; } /** * @return Id */ public function getExtraId() { return $this->extraId; } /** * @param Id $extraId */ public function setExtraId(Id $extraId) { $this->extraId = $extraId; } /** * @return PositiveInteger */ public function getQuantity() { return $this->quantity; } /** * @param PositiveInteger $quantity */ public function setQuantity(PositiveInteger $quantity) { $this->quantity = $quantity; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return BooleanValueObject */ public function getAggregatedPrice() { return $this->aggregatedPrice; } /** * @param BooleanValueObject $aggregatedPrice */ public function setAggregatedPrice(BooleanValueObject $aggregatedPrice) { $this->aggregatedPrice = $aggregatedPrice; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'customerBookingId' => $this->getCustomerBookingId() ? $this->getCustomerBookingId()->getValue() : null, 'extraId' => $this->getExtraId()->getValue(), 'quantity' => $this->getQuantity() ? $this->getQuantity()->getValue() : 1, 'price' => null !== $this->getPrice() ? $this->getPrice()->getValue() : null, 'aggregatedPrice' => $this->getAggregatedPrice() ? $this->getAggregatedPrice()->getValue() : null, ]; } } Booking/Reservation.php 0000666 00000017067 15165376126 0011201 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Bookable\AbstractBookable; use AmeliaBooking\Domain\Entity\Bookable\Service\Package; use AmeliaBooking\Domain\Entity\Booking\Appointment\Appointment; use AmeliaBooking\Domain\Entity\Booking\Appointment\CustomerBooking; use AmeliaBooking\Domain\Entity\Booking\Event\Event; use AmeliaBooking\Domain\Entity\Payment\Payment; use AmeliaBooking\Domain\Entity\User\AbstractUser; use AmeliaBooking\Domain\Entity\User\Customer; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\String\Label; /** * Class Reservation * * @package AmeliaBooking\Domain\Entity\Booking */ class Reservation { /** @var Appointment|Event */ private $reservation; /** @var CustomerBooking */ private $booking; /** @var AbstractBookable */ private $bookable; /** @var Customer */ private $customer; /** @var Label */ private $locale; /** @var Label */ private $timeZone; /** @var BooleanValueObject */ private $isNewUser; /** @var BooleanValueObject */ private $isStatusChanged; /** @var BooleanValueObject */ private $applyDeposit; /** @var array */ private $uploadedCustomFieldFilesInfo; /** @var Collection */ private $recurring; /** @var Collection */ private $packageReservations; /** @var Collection */ private $packageCustomerServices; /** @var BooleanValueObject */ private $couponValidation; /** @var BooleanValueObject */ private $customFieldsValidation; /** @var BooleanValueObject */ private $availabilityValidation; /** @var AbstractUser $user */ private $loggedInUser; /** @var Payment $payment */ private $payment; /** * @return BooleanValueObject */ public function hasCouponValidation() { return $this->couponValidation; } /** * @param BooleanValueObject $couponValidation */ public function setCouponValidation(BooleanValueObject $couponValidation) { $this->couponValidation = $couponValidation; } /** * @return BooleanValueObject */ public function hasCustomFieldsValidation() { return $this->customFieldsValidation; } /** * @param BooleanValueObject $customFieldsValidation */ public function setCustomFieldsValidation(BooleanValueObject $customFieldsValidation) { $this->customFieldsValidation = $customFieldsValidation; } /** * @return BooleanValueObject */ public function hasAvailabilityValidation() { return $this->availabilityValidation; } /** * @param BooleanValueObject $availabilityValidation */ public function setAvailabilityValidation(BooleanValueObject $availabilityValidation) { $this->availabilityValidation = $availabilityValidation; } /** * @return Appointment|Event */ public function getReservation() { return $this->reservation; } /** * @param Appointment|Event|Package $reservation */ public function setReservation($reservation) { $this->reservation = $reservation; } /** * @return CustomerBooking */ public function getBooking() { return $this->booking; } /** * @param CustomerBooking $booking */ public function setBooking(CustomerBooking $booking) { $this->booking = $booking; } /** * @return AbstractBookable */ public function getBookable() { return $this->bookable; } /** * @param AbstractBookable $bookable */ public function setBookable(AbstractBookable $bookable) { $this->bookable = $bookable; } /** * @return Customer */ public function getCustomer() { return $this->customer; } /** * @param Customer $customer */ public function setCustomer(Customer $customer) { $this->customer = $customer; } /** * @return Label */ public function getLocale() { return $this->locale; } /** * @param Label $locale */ public function setLocale(Label $locale) { $this->locale = $locale; } /** * @return Label */ public function getTimeZone() { return $this->timeZone; } /** * @param Label $timeZone */ public function setTimeZone(Label $timeZone) { $this->timeZone = $timeZone; } /** * @return Collection */ public function getRecurring() { return $this->recurring; } /** * @param Collection $recurring */ public function setRecurring(Collection $recurring) { $this->recurring = $recurring; } /** * @return Collection */ public function getPackageReservations() { return $this->packageReservations; } /** * @param Collection $packageReservations */ public function setPackageReservations(Collection $packageReservations) { $this->packageReservations = $packageReservations; } /** * @return Collection */ public function getPackageCustomerServices() { return $this->packageCustomerServices; } /** * @param Collection $packageCustomerServices */ public function setPackageCustomerServices(Collection $packageCustomerServices) { $this->packageCustomerServices = $packageCustomerServices; } /** * @return BooleanValueObject */ public function isNewUser() { return $this->isNewUser; } /** * @param BooleanValueObject $isNewUser */ public function setIsNewUser(BooleanValueObject $isNewUser) { $this->isNewUser = $isNewUser; } /** * @return BooleanValueObject */ public function isStatusChanged() { return $this->isStatusChanged; } /** * @param BooleanValueObject $isStatusChanged */ public function setIsStatusChanged(BooleanValueObject $isStatusChanged) { $this->isStatusChanged = $isStatusChanged; } /** * @return array */ public function getUploadedCustomFieldFilesInfo() { return $this->uploadedCustomFieldFilesInfo; } /** * @param array $uploadedCustomFieldFilesInfo */ public function setUploadedCustomFieldFilesInfo(array $uploadedCustomFieldFilesInfo) { $this->uploadedCustomFieldFilesInfo = $uploadedCustomFieldFilesInfo; } /** * @return BooleanValueObject */ public function getApplyDeposit() { return $this->applyDeposit; } /** * @param BooleanValueObject $applyDeposit */ public function setApplyDeposit(BooleanValueObject $applyDeposit) { $this->applyDeposit = $applyDeposit; } /** * @return AbstractUser */ public function getLoggedInUser() { return $this->loggedInUser; } /** * @param AbstractUser $loggedInUser */ public function setLoggedInUser(AbstractUser $loggedInUser) { $this->loggedInUser = $loggedInUser; } /** * @return Payment */ public function getPayment() { return $this->payment; } /** * @param Payment $payment */ public function setPayment($payment) { $this->payment = $payment; } } Booking/SlotsEntities.php 0000666 00000003162 15165376126 0011500 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking; use AmeliaBooking\Domain\Collection\Collection; /** * Class SlotsEntities * * @package AmeliaBooking\Domain\Entity\Booking */ class SlotsEntities { /** @var Collection */ private $services; /** @var Collection */ private $providers; /** @var Collection */ private $locations; /** @var Collection */ private $resources; /** * @return Collection */ public function getServices() { return $this->services; } /** * @param Collection $services */ public function setServices(Collection $services) { $this->services = $services; } /** * @return Collection */ public function getProviders() { return $this->providers; } /** * @param Collection $providers */ public function setProviders(Collection $providers) { $this->providers = $providers; } /** * @return Collection */ public function getLocations() { return $this->locations; } /** * @param Collection $locations */ public function setLocations(Collection $locations) { $this->locations = $locations; } /** * @return Collection */ public function getResources() { return $this->resources; } /** * @param Collection $resources */ public function setResources(Collection $resources) { $this->resources = $resources; } } Booking/AbstractBooking.php 0000666 00000005645 15165376126 0011753 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\ValueObjects\String\BookingStatus; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Description; /** * Class AbstractBooking * * @package AmeliaBooking\Domain\Entity\Booking */ abstract class AbstractBooking { /** @var Id */ private $id; /** @var Collection */ protected $bookings; /** @var bool */ protected $notifyParticipants; /** @var Description */ protected $internalNotes; /** @var BookingStatus */ protected $status; /** * AbstractBooking constructor. * * @param boolean $notifyParticipants */ public function __construct($notifyParticipants) { $this->notifyParticipants = $notifyParticipants; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Collection */ public function getBookings() { return $this->bookings; } /** * @param Collection $bookings */ public function setBookings(Collection $bookings) { $this->bookings = $bookings; } /** * @return bool */ public function isNotifyParticipants() { return $this->notifyParticipants; } /** * @param bool $notifyParticipants */ public function setNotifyParticipants($notifyParticipants) { $this->notifyParticipants = $notifyParticipants; } /** * @return Description */ public function getInternalNotes() { return $this->internalNotes; } /** * @param Description $internalNotes */ public function setInternalNotes(Description $internalNotes) { $this->internalNotes = $internalNotes; } /** * @return BookingStatus */ public function getStatus() { return $this->status; } /** * @param BookingStatus $status */ public function setStatus(BookingStatus $status) { $this->status = $status; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'bookings' => null !== $this->getBookings() ? $this->getBookings()->toArray() : null, 'notifyParticipants' => $this->isNotifyParticipants(), 'internalNotes' => null !== $this->getInternalNotes() ? $this->getInternalNotes()->getValue() : null, 'status' => $this->getStatus() ? $this->getStatus()->getValue() : null, ]; } } Booking/AbstractCustomerBooking.php 0000666 00000011626 15165376126 0013471 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Booking; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Coupon\Coupon; use AmeliaBooking\Domain\Entity\User\Customer; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\String\BookingStatus; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class AbstractCustomerBooking * * @package AmeliaBooking\Domain\Entity\Booking */ abstract class AbstractCustomerBooking { /** @var Id */ private $id; /** @var Id */ protected $customerId; /** @var Customer */ protected $customer; /** @var BookingStatus */ protected $status; /** @var Collection */ protected $extras; /** @var Id */ protected $couponId; /** @var Price */ protected $price; /** @var Coupon */ protected $coupon; /** @var Json */ protected $customFields; /** @var Json */ protected $info; /** * AbstractCustomerBooking constructor. * * @param Id $customerId * @param BookingStatus $status */ public function __construct( Id $customerId, BookingStatus $status ) { $this->customerId = $customerId; $this->status = $status; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getCustomerId() { return $this->customerId; } /** * @param Id $customerId */ public function setCustomerId(Id $customerId) { $this->customerId = $customerId; } /** * @return Customer */ public function getCustomer() { return $this->customer; } /** * @param Customer $customer */ public function setCustomer(Customer $customer) { $this->customer = $customer; } /** * @return BookingStatus */ public function getStatus() { return $this->status; } /** * @param BookingStatus $status */ public function setStatus(BookingStatus $status) { $this->status = $status; } /** * @return Collection */ public function getExtras() { return $this->extras; } /** * @param Collection $extras */ public function setExtras(Collection $extras) { $this->extras = $extras; } /** * @return Id */ public function getCouponId() { return $this->couponId; } /** * @param Id $couponId */ public function setCouponId(Id $couponId) { $this->couponId = $couponId; } /** * @return Coupon */ public function getCoupon() { return $this->coupon; } /** * @param Coupon $coupon */ public function setCoupon(Coupon $coupon) { $this->coupon = $coupon; } /** * @return Price */ public function getPrice() { return $this->price; } /** * @param Price $price */ public function setPrice(Price $price) { $this->price = $price; } /** * @return Json */ public function getCustomFields() { return $this->customFields; } /** * @param Json $customFields */ public function setCustomFields($customFields) { $this->customFields = $customFields; } /** * @return Json */ public function getInfo() { return $this->info; } /** * @param Json $info */ public function setInfo(Json $info) { $this->info = $info; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'customerId' => $this->getCustomerId()->getValue(), 'customer' => null !== $this->getCustomer() ? $this->getCustomer()->toArray() : null, 'status' => $this->getStatus()->getValue(), 'extras' => null !== $this->getExtras() ? $this->getExtras()->toArray() : null, 'couponId' => null !== $this->getCouponId() ? $this->getCouponId()->getValue() : null, 'price' => null !== $this->getPrice() ? $this->getPrice()->getValue() : null, 'coupon' => null !== $this->getCoupon() ? $this->getCoupon()->toArray() : null, 'customFields' => null !== $this->getCustomFields() ? $this->getCustomFields()->getValue() : null, 'info' => null !== $this->getInfo() ? $this->getInfo()->getValue() : null, ]; } } Payment/Payment.php 0000666 00000021627 15165376126 0010337 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Payment; use AmeliaBooking\Domain\ValueObjects\BooleanValueObject; use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue; use AmeliaBooking\Domain\ValueObjects\Number\Float\Price; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\PaymentStatus; use AmeliaBooking\Domain\ValueObjects\String\PaymentData; use AmeliaBooking\Domain\ValueObjects\String\Url; /** * Class Payment * * @package AmeliaBooking\Domain\Entity\Payment */ class Payment { /** @var Id */ private $id; /** @var Id */ private $customerBookingId; /** @var Id */ private $packageCustomerId; /** @var Id */ private $parentId; /** @var Price */ private $amount; /** @var DateTimeValue */ private $dateTime; /** @var PaymentStatus */ private $status; /** @var PaymentGateway */ private $gateway; /** @var Name */ private $gatewayTitle; /** @var PaymentData */ private $data; /** @var DateTimeValue */ private $created; /** @var Name */ private $entity; /** @var BooleanValueObject */ private $actionsCompleted; /** @var Id */ private $wcOrderId; /** @var Url */ private $wcOrderUrl; /** @var Price */ private $wcItemCouponValue; /** @var Price */ private $wcItemTaxValue; /** @var string */ private $transactionId; /** * Payment constructor. * * @param Id $customerBookingId * @param Price $amount * @param DateTimeValue $dateTime * @param PaymentStatus $status * @param PaymentGateway $gateway * @param PaymentData $data */ public function __construct( Id $customerBookingId, Price $amount, DateTimeValue $dateTime, PaymentStatus $status, PaymentGateway $gateway, PaymentData $data ) { $this->customerBookingId = $customerBookingId; $this->amount = $amount; $this->dateTime = $dateTime; $this->status = $status; $this->gateway = $gateway; $this->data = $data; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Id */ public function getCustomerBookingId() { return $this->customerBookingId; } /** * @param Id $customerBookingId */ public function setCustomerBookingId($customerBookingId) { $this->customerBookingId = $customerBookingId; } /** * @return Id */ public function getPackageCustomerId() { return $this->packageCustomerId; } /** * @param Id $packageCustomerId */ public function setPackageCustomerId($packageCustomerId) { $this->packageCustomerId = $packageCustomerId; } /** * @return Id */ public function getParentId() { return $this->parentId; } /** * @param Id $parentId */ public function setParentId($parentId) { $this->parentId = $parentId; } /** * @return Price */ public function getAmount() { return $this->amount; } /** * @param Price $amount */ public function setAmount($amount) { $this->amount = $amount; } /** * @return DateTimeValue */ public function getDateTime() { return $this->dateTime; } /** * @param DateTimeValue $dateTime */ public function setDateTime($dateTime) { $this->dateTime = $dateTime; } /** * @return PaymentStatus */ public function getStatus() { return $this->status; } /** * @param PaymentStatus $status */ public function setStatus($status) { $this->status = $status; } /** * @return PaymentGateway */ public function getGateway() { return $this->gateway; } /** * @param PaymentGateway $gateway */ public function setGateway($gateway) { $this->gateway = $gateway; } /** * @return Name */ public function getGatewayTitle() { return $this->gatewayTitle; } /** * @param Name $gatewayTitle */ public function setGatewayTitle($gatewayTitle) { $this->gatewayTitle = $gatewayTitle; } /** * @return PaymentData */ public function getData() { return $this->data; } /** * @param PaymentData $data */ public function setData($data) { $this->data = $data; } /** * @return DateTimeValue */ public function getCreated() { return $this->created; } /** * @param DateTimeValue $created */ public function setCreated($created) { $this->created = $created; } /** * @return Name */ public function getEntity() { return $this->entity; } /** * @param Name $entity */ public function setEntity($entity) { $this->entity = $entity; } /** * @return BooleanValueObject */ public function getActionsCompleted() { return $this->actionsCompleted; } /** * @param BooleanValueObject $actionsCompleted */ public function setActionsCompleted($actionsCompleted) { $this->actionsCompleted = $actionsCompleted; } /** * @return Id */ public function getWcOrderId() { return $this->wcOrderId; } /** * @param Id $wcOrderId */ public function setWcOrderId($wcOrderId) { $this->wcOrderId = $wcOrderId; } /** * @return Url */ public function getWcOrderUrl() { return $this->wcOrderUrl; } /** * @param Url $wcOrderUrl */ public function setWcOrderUrl($wcOrderUrl) { $this->wcOrderUrl = $wcOrderUrl; } /** * @return Price */ public function getWcItemCouponValue() { return $this->wcItemCouponValue; } /** * @param Price $wcItemCouponValue */ public function setWcItemCouponValue($wcItemCouponValue) { $this->wcItemCouponValue = $wcItemCouponValue; } /** * @return Price */ public function getWcItemTaxValue() { return $this->wcItemTaxValue; } /** * @param Price $wcItemTaxValue */ public function setWcItemTaxValue($wcItemTaxValue) { $this->wcItemTaxValue = $wcItemTaxValue; } /** * @return string|null */ public function getTransactionId() { return $this->transactionId; } /** * @param string|null $transactionId */ public function setTransactionId(string $transactionId) { $this->transactionId = $transactionId; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'customerBookingId' => $this->customerBookingId ? $this->customerBookingId->getValue() : null, 'packageCustomerId' => $this->packageCustomerId ? $this->packageCustomerId->getValue() : null, 'parentId' => $this->getParentId() ? $this->getParentId()->getValue() : null, 'amount' => $this->amount->getValue(), 'gateway' => $this->gateway->getName()->getValue(), 'gatewayTitle' => null !== $this->getGatewayTitle() ? $this->getGatewayTitle()->getValue() : '', 'dateTime' => null !== $this->dateTime ? $this->dateTime->getValue()->format('Y-m-d H:i:s') : null, 'status' => $this->status->getValue(), 'data' => $this->data->getValue(), 'entity' => $this->getEntity() ? $this->getEntity()->getValue() : null, 'created' => $this->getCreated() ? $this->getCreated()->getValue()->format('Y-m-d H:i:s') : null, 'actionsCompleted' => $this->getActionsCompleted() ? $this->getActionsCompleted()->getValue() : null, 'wcOrderId' => $this->getWcOrderId() ? $this->getWcOrderId()->getValue() : null, 'wcOrderUrl' => $this->getWcOrderUrl() ? $this->getWcOrderUrl()->getValue() : null, 'wcItemCouponValue' => $this->getWcItemCouponValue() ? $this->getWcItemCouponValue()->getValue() : null, 'wcItemTaxValue' => $this->getWcItemTaxValue() ? $this->getWcItemTaxValue()->getValue() : null, 'transactionId' => $this->getTransactionId(), ]; } } Payment/PaymentGateway.php 0000666 00000002301 15165376126 0011645 0 ustar 00 <?php /** * @copyright © TMS-Plugins. All rights reserved. * @licence See LICENCE.md for license details. */ namespace AmeliaBooking\Domain\Entity\Payment; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; /** * Class PaymentGateway * * @package AmeliaBooking\Domain\Entity\Gateway */ class PaymentGateway { /** @var Id */ private $id; /** @var Name */ private $name; /** * PaymentGateway constructor. * * @param Name $name */ public function __construct(Name $name) { $this->setName($name); } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId($id) { $this->id = $id; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return array */ public function toArray() { return [ $this->getName()->getValue(), ]; } } Location/Location.php 0000666 00000011356 15165376126 0010623 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Location; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\String\Status; use AmeliaBooking\Domain\ValueObjects\Picture; use AmeliaBooking\Domain\ValueObjects\String\Address; use AmeliaBooking\Domain\ValueObjects\String\Description; use AmeliaBooking\Domain\ValueObjects\GeoTag; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Phone; use AmeliaBooking\Domain\ValueObjects\String\Url; /** * Class Location * * @package AmeliaBooking\Domain\Entity\Location */ class Location { /** @var Id */ private $id; /** @var Status */ private $status; /** @var Name */ private $name; /** @var Description */ private $description; /** @var Address */ private $address; /** @var Phone */ private $phone; /** @var GeoTag */ private $coordinates; /** @var Picture */ private $picture; /** @var Url */ private $pin; /** @var Json */ protected $translations; /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return Name */ public function getName() { return $this->name; } /** * @param Name $name */ public function setName(Name $name) { $this->name = $name; } /** * @return Description */ public function getDescription() { return $this->description; } /** * @param Description $description */ public function setDescription(Description $description) { $this->description = $description; } /** * @return Address */ public function getAddress() { return $this->address; } /** * @param Address $address */ public function setAddress(Address $address) { $this->address = $address; } /** * @return Phone */ public function getPhone() { return $this->phone; } /** * @param Phone $phone */ public function setPhone(Phone $phone) { $this->phone = $phone; } /** * @return GeoTag */ public function getCoordinates() { return $this->coordinates; } /** * @param GeoTag $coordinates */ public function setCoordinates(GeoTag $coordinates) { $this->coordinates = $coordinates; } /** * @return Picture */ public function getPicture() { return $this->picture; } /** * @param Picture $picture */ public function setPicture(Picture $picture) { $this->picture = $picture; } /** * @return Url */ public function getPin() { return $this->pin; } /** * @param Url $pin */ public function setPin(Url $pin) { $this->pin = $pin; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'status' => null !== $this->getStatus() ? $this->getStatus()->getValue() : null, 'name' => $this->getName()->getValue(), 'description' => null !== $this->getDescription() ? $this->getDescription()->getValue() : null, 'address' => $this->getAddress()->getValue(), 'phone' => $this->getPhone()->getValue(), 'latitude' => $this->getCoordinates()->getLatitude(), 'longitude' => $this->getCoordinates()->getLongitude(), 'pictureFullPath' => null !== $this->getPicture() ? $this->getPicture()->getFullPath() : null, 'pictureThumbPath' => null !== $this->getPicture() ? $this->getPicture()->getThumbPath() : null, 'pin' => null !== $this->getPin() ? $this->getPin()->getValue() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, ]; } } Location/ProviderLocation.php 0000666 00000003077 15165376126 0012337 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\Location; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; /** * Class ProviderLocation * * @package AmeliaBooking\Domain\Entity\Location */ class ProviderLocation { /** @var Id */ private $id; /** @var Id */ private $locationId; /** @var Id */ private $userId; /** * @param Id $userId * @param Id $locationId */ public function __construct( Id $userId, Id $locationId ) { $this->userId = $userId; $this->locationId = $locationId; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return Id */ public function getUserId() { return $this->userId; } /** * @param Id $userId */ public function setUserId(Id $userId) { $this->userId = $userId; } /** * @return array */ public function toArray() { return [ 'id' => $this->id !== null ? $this->id->getValue() : null, 'locationId' => $this->locationId->getValue(), 'userId' => $this->userId->getValue(), ]; } } Entities.php 0000666 00000002667 15165376126 0007074 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity; /** * Class Entities * * @package AmeliaBooking\Domain\Entity */ class Entities { const APPOINTMENT = 'appointment'; const APPOINTMENTS = 'appointments'; const BOOKABLE = 'bookable'; const BOOKING = 'booking'; const BOOKINGS = 'bookings'; const CALENDAR = 'calendar'; const CATEGORIES = 'categories'; const CATEGORY = 'category'; const COUPON = 'coupon'; const COUPONS = 'coupons'; const CUSTOM_FIELD = 'custom_field'; const CUSTOM_FIELDS = 'custom_fields'; const CUSTOMER = 'customer'; const CUSTOMERS = 'customers'; const DASHBOARD = 'dashboard'; const EVENT = 'event'; const EVENTS = 'events'; const EMPLOYEE = 'employee'; const EMPLOYEES = 'employees'; const PROVIDER = 'provider'; const PROVIDERS = 'providers'; const TAGS = 'tags'; const EXTRA = 'extra'; const EXTRAS = 'extras'; const FINANCE = 'finance'; const LOCATION = 'location'; const LOCATIONS = 'locations'; const NOTIFICATION = 'notification'; const NOTIFICATIONS = 'notifications'; const PACKAGE = 'package'; const PACKAGES = 'packages'; const PAYMENT = 'payment'; const PAYMENTS = 'payments'; const RESOURCE = 'resource'; const RESOURCES = 'resources'; const SERVICE = 'service'; const SERVICES = 'services'; const SETTINGS = 'settings'; const USER = 'user'; const USERS = 'users'; } User/Customer.php 0000666 00000003066 15165376126 0010021 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\User; use AmeliaBooking\Domain\ValueObjects\Gender; use AmeliaBooking\Domain\ValueObjects\String\Email; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Phone; /** * Class Customer * * @package AmeliaBooking\Domain\Entity\User */ class Customer extends AbstractUser { /** @var Gender */ private $gender; /** * @param Name $firstName * @param Name $lastName * @param Email $email * @param Phone $phone * @param Gender $gender */ public function __construct( Name $firstName, Name $lastName, Email $email, Phone $phone, Gender $gender ) { parent::__construct($firstName, $lastName, $email); $this->phone = $phone; $this->gender = $gender; } /** * @return Gender */ public function getGender() { return $this->gender; } /** * @param Gender $gender */ public function setGender(Gender $gender) { $this->gender = $gender; } /** * Get the user type in a string form */ public function getType() { return self::USER_ROLE_CUSTOMER; } /** * @return array */ public function toArray() { return array_merge( parent::toArray(), [ 'phone' => $this->getPhone()->getValue(), 'gender' => $this->getGender()->getValue(), ] ); } } User/Admin.php 0000666 00000000453 15165376126 0007245 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\User; /** * Class Admin * * @package AmeliaBooking\Domain\Entity\User */ class Admin extends AbstractUser { /** * Get the user type in a string form */ public function getType() { return self::USER_ROLE_ADMIN; } } User/AbstractUser.php 0000666 00000017631 15165376126 0010625 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\User; use AmeliaBooking\Domain\ValueObjects\DateTime\Birthday; use AmeliaBooking\Domain\ValueObjects\Json; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\Picture; use AmeliaBooking\Domain\ValueObjects\String\Description; use AmeliaBooking\Domain\ValueObjects\String\Email; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Password; use AmeliaBooking\Domain\ValueObjects\String\Phone; use AmeliaBooking\Domain\ValueObjects\String\Status; /** * Class AbstractUser * * @package AmeliaBooking\Domain\Entity\User * */ abstract class AbstractUser { const USER_ROLE_ADMIN = 'admin'; const USER_ROLE_PROVIDER = 'provider'; const USER_ROLE_MANAGER = 'manager'; const USER_ROLE_CUSTOMER = 'customer'; /** @var Description */ private $note; /** @var Id */ private $id; /** @var Status */ private $status; /** @var Name */ protected $firstName; /** @var Name */ protected $lastName; /** @var Birthday */ protected $birthday; /** @var Picture */ protected $picture; /** @var Id */ protected $externalId; /** @var Email */ protected $email; /** @var Phone */ protected $phone; /** @var Password */ private $password; /** @var Json */ private $usedTokens; /** @var int */ private $loginType; /** @var Name */ private $zoomUserId; /** @var Name */ private $countryPhoneIso; /** @var Json */ protected $translations; /** * AbstractUser constructor. * * @param Name $firstName * @param Name $lastName * @param Email $email */ public function __construct( Name $firstName, Name $lastName, Email $email ) { $this->firstName = $firstName; $this->lastName = $lastName; $this->email = $email; } /** * @return Id */ public function getId() { return $this->id; } /** * @param Id $id */ public function setId(Id $id) { $this->id = $id; } /** * @return Status */ public function getStatus() { return $this->status; } /** * @param Status $status */ public function setStatus(Status $status) { $this->status = $status; } /** * @return Name */ public function getFirstName() { return $this->firstName; } /** * @param Name $firstName */ public function setFirstName(Name $firstName) { $this->firstName = $firstName; } /** * @return Name */ public function getLastName() { return $this->lastName; } /** * @param Name $lastName */ public function setLastName(Name $lastName) { $this->lastName = $lastName; } /** * @return string */ public function getFullName() { return $this->firstName->getValue() . ' ' . $this->lastName->getValue(); } /** * @return Birthday */ public function getBirthday() { return $this->birthday; } /** * @param Birthday $birthday */ public function setBirthday(Birthday $birthday) { $this->birthday = $birthday; } /** * @return Picture */ public function getPicture() { return $this->picture; } /** * @param Picture $picture */ public function setPicture(Picture $picture) { $this->picture = $picture; } /** * @return ID */ public function getExternalId() { return $this->externalId; } /** * @param ID $externalId */ public function setExternalId(Id $externalId) { $this->externalId = $externalId; } /** * @return Email */ public function getEmail() { return $this->email; } /** * @param Email $email */ public function setEmail(Email $email) { $this->email = $email; } /** * @return Phone */ public function getPhone() { return $this->phone; } /** * @param Phone $phone */ public function setPhone(Phone $phone) { $this->phone = $phone; } /** * Get the user type in a string form */ public function getType() { return self::USER_ROLE_CUSTOMER; } /** * @return Description */ public function getNote() { return $this->note; } /** * @param Description $note */ public function setNote(Description $note) { $this->note = $note; } /** * @return Name */ public function getZoomUserId() { return $this->zoomUserId; } /** * @param Name $zoomUserId */ public function setZoomUserId(Name $zoomUserId) { $this->zoomUserId = $zoomUserId; } /** * @return Password */ public function getPassword() { return $this->password; } /** * @param Password $password */ public function setPassword($password) { $this->password = $password; } /** * @return Json */ public function getUsedTokens() { return $this->usedTokens; } /** * @param Json $usedTokens */ public function setUsedTokens($usedTokens) { $this->usedTokens = $usedTokens; } /** * @return int */ public function getLoginType() { return $this->loginType; } /** * @param int $loginType */ public function setLoginType($loginType) { $this->loginType = $loginType; } /** * @return Name */ public function getCountryPhoneIso() { return $this->countryPhoneIso; } /** * @param Name $countryPhoneIso */ public function setCountryPhoneIso(Name $countryPhoneIso) { $this->countryPhoneIso = $countryPhoneIso; } /** * @return Json */ public function getTranslations() { return $this->translations; } /** * @param Json $translations */ public function setTranslations(Json $translations) { $this->translations = $translations; } /** * @return array */ public function toArray() { return [ 'id' => null !== $this->getId() ? $this->getId()->getValue() : null, 'firstName' => $this->getFirstName()->getValue(), 'lastName' => $this->getLastName()->getValue(), 'birthday' => null !== $this->getBirthday() ? $this->getBirthday()->getValue() : null, 'email' => $this->getEmail()->getValue(), 'phone' => null !== $this->getPhone() ? $this->getPhone()->getValue() : null, 'type' => $this->getType(), 'status' => null !== $this->getStatus() ? $this->getStatus()->getValue() : null, 'note' => null !== $this->getNote() ? $this->getNote()->getValue() : null, 'zoomUserId' => null !== $this->getZoomUserId() ? $this->getZoomUserId()->getValue() : null, 'countryPhoneIso' => null !== $this->getCountryPhoneIso() ? $this->getCountryPhoneIso()->getValue() : null, 'externalId' => null !== $this->getExternalId() ? $this->getExternalId()->getValue() : null, 'pictureFullPath' => null !== $this->getPicture() ? $this->getPicture()->getFullPath() : null, 'pictureThumbPath' => null !== $this->getPicture() ? $this->getPicture()->getThumbPath() : null, 'translations' => $this->getTranslations() ? $this->getTranslations()->getValue() : null, // 'password' => null !== $this->getPassword() ? $this->getPassword()->getValue() : null ]; } } User/Manager.php 0000666 00000000461 15165376126 0007566 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\User; /** * Class Manager * * @package AmeliaBooking\Domain\Entity\User */ class Manager extends AbstractUser { /** * Get the user type in a string form */ public function getType() { return self::USER_ROLE_MANAGER; } } User/Provider.php 0000666 00000014256 15165376126 0010015 0 ustar 00 <?php namespace AmeliaBooking\Domain\Entity\User; use AmeliaBooking\Domain\Collection\Collection; use AmeliaBooking\Domain\Entity\Google\GoogleCalendar; use AmeliaBooking\Domain\Entity\Outlook\OutlookCalendar; use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id; use AmeliaBooking\Domain\ValueObjects\String\Description; use AmeliaBooking\Domain\ValueObjects\String\Email; use AmeliaBooking\Domain\ValueObjects\String\Name; use AmeliaBooking\Domain\ValueObjects\String\Phone; /** * Class Provider * * @package AmeliaBooking\Domain\Entity\User */ class Provider extends AbstractUser { /** @var Collection */ private $weekDayList; /** @var Collection */ private $serviceList; /** @var Collection */ private $dayOffList; /** @var Collection */ private $specialDayList; /** @var Collection */ private $appointmentList; /** @var Id */ private $locationId; /** @var GoogleCalendar */ private $googleCalendar; /** @var OutlookCalendar */ private $outlookCalendar; /** @var Name */ private $timeZone; /** @var Description */ private $description; /** * @param Name $firstName * @param Name $lastName * @param Email $email * @param Phone $phone * @param Collection $weekDayList * @param Collection $serviceList * @param Collection $dayOffList * @param Collection $specialDayList * @param Collection $appointmentList */ public function __construct( Name $firstName, Name $lastName, Email $email, Phone $phone, Collection $weekDayList, Collection $serviceList, Collection $dayOffList, Collection $specialDayList, Collection $appointmentList ) { parent::__construct($firstName, $lastName, $email); $this->phone = $phone; $this->weekDayList = $weekDayList; $this->serviceList = $serviceList; $this->dayOffList = $dayOffList; $this->specialDayList = $specialDayList; $this->appointmentList = $appointmentList; } /** * Get the user type in a string form */ public function getType() { return self::USER_ROLE_PROVIDER; } /** * @return Collection */ public function getWeekDayList() { return $this->weekDayList; } /** * @param Collection $weekDayList */ public function setWeekDayList(Collection $weekDayList) { $this->weekDayList = $weekDayList; } /** * @return Collection */ public function getServiceList() { return $this->serviceList; } /** * @param Collection $serviceList */ public function setServiceList(Collection $serviceList) { $this->serviceList = $serviceList; } /** * @return Collection */ public function getDayOffList() { return $this->dayOffList; } /** * @param Collection $dayOffList */ public function setDayOffList(Collection $dayOffList) { $this->dayOffList = $dayOffList; } /** * @return Collection */ public function getSpecialDayList() { return $this->specialDayList; } /** * @param Collection $specialDayList */ public function setSpecialDayList(Collection $specialDayList) { $this->specialDayList = $specialDayList; } /** * @return Collection */ public function getAppointmentList() { return $this->appointmentList; } /** * @param Collection $appointmentList */ public function setAppointmentList(Collection $appointmentList) { $this->appointmentList = $appointmentList; } /** * @return Id */ public function getLocationId() { return $this->locationId; } /** * @param Id $locationId */ public function setLocationId(Id $locationId) { $this->locationId = $locationId; } /** * @return GoogleCalendar mixed */ public function getGoogleCalendar() { return $this->googleCalendar; } /** * @param mixed $googleCalendar */ public function setGoogleCalendar($googleCalendar) { $this->googleCalendar = $googleCalendar; } /** * @return OutlookCalendar mixed */ public function getOutlookCalendar() { return $this->outlookCalendar; } /** * @param mixed $outlookCalendar */ public function setOutlookCalendar($outlookCalendar) { $this->outlookCalendar = $outlookCalendar; } /** * @return Name */ public function getTimeZone() { return $this->timeZone; } /** * @param Name $timeZone */ public function setTimeZone($timeZone) { $this->timeZone = $timeZone; } /** * @return Description */ public function getDescription() { return $this->description; } /** * @param Description $description */ public function setDescription($description) { $this->description = $description; } /** * Returns the Provider entity fields in an array form */ public function toArray() { return array_merge( parent::toArray(), [ 'phone' => $this->phone->getValue(), 'weekDayList' => $this->weekDayList->toArray(), 'serviceList' => $this->serviceList->toArray(), 'dayOffList' => $this->dayOffList->toArray(), 'specialDayList' => $this->specialDayList->toArray(), 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null, 'googleCalendar' => $this->getGoogleCalendar() ? $this->getGoogleCalendar()->toArray() : null, 'outlookCalendar' => $this->getOutlookCalendar() ? $this->getOutlookCalendar()->toArray() : null, 'timeZone' => $this->getTimeZone() ? $this->getTimeZone()->getValue() : null, 'description' => $this->getDescription() ? $this->getDescription()->getValue() : null, ] ); } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings