diff --git a/src/Entity/ActivityEntity.php b/src/Entity/ActivityEntity.php new file mode 100644 index 0000000..276ca4f --- /dev/null +++ b/src/Entity/ActivityEntity.php @@ -0,0 +1,208 @@ +id; + } + + /** + * Set the ID of the entity + *
This should not be done after creation + * + * @param string $id + * @return self + */ + public function setId(string $id): self + { + $this->id = $id; + + return $this; + } + + /** + * Generate and save a random ID + * + * @return string Generated ID + */ + public function generateId(): string + { + // Generate ID + $id = StringGenerationHelper::generateString(array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9')), 8); + + // Save and return + $this->setId($id); + return $id; + } + + /** + * Get the activity name + * + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * Set a new name for the activity + * + * @param string $name + * @return self + */ + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + /** + * Get the scheduled start date + * + * @return DateTime|NULL + */ + public function getStartDate(): ?DateTime + { + return $this->startDate; + } + + /** + * Set a new scheduled start date + * + * @param DateTime|NULL $startDate + * @return self + */ + public function setStartDate(?DateTime $startDate): self + { + $this->startDate = $startDate; + + return $this; + } + + /** + * Get the scheduled end date + * + * @return DateTime|NULL + */ + public function getEndDate(): ?DateTime + { + return $this->endDate; + } + + /** + * Set the new schedules end date + * + * @param DateTime|NULL $endDate + * @return self + */ + public function setEndDate(?DateTime $endDate): self + { + $this->endDate = $endDate; + + return $this; + } + + /** + * Get the effectiv start date + * + * @return DateTime|NULL + */ + public function getRealStartDate(): ?DateTime + { + return $this->realStartDate; + } + + /** + * Set the new effective start date + * + * @param DateTime|NULL $realStartDate + * @return self + */ + public function setRealStartDate(?DateTime $realStartDate): self + { + $this->realStartDate = $realStartDate; + + return $this; + } + + /** + * Get the effective end date + * + * @return DateTime|NULL + */ + public function getRealEndDate(): ?DateTime + { + return $this->realEndDate; + } + + /** + * Set the new effective end date + * + * @param DateTime|NULL $realEndDate + * @return self + */ + public function setRealEndDate(?DateTime $realEndDate): self + { + $this->realEndDate = $realEndDate; + } + + /** + * Get the related actor + * + * @return ActorEntity|NULL + */ + public function getActor(): ?ActorEntity + { + return $this->actor; + } + + /** + * Set the new related actor + * + * @param ActorEntity|NULL $actor + * @return self + */ + public function setActor(?ActorEntity $actor): self + { + $this->actor = $actor; + + return $this; + } +} \ No newline at end of file