id; } /** * @param int $id * * @return $this */ public function setId($id) { $this->propertyChanged('id', $this->id, $id); $this->id = $id; return $this; } /** * @return \DateTime */ public function getDate() { return $this->date; } /** * @param \DateTime $submittedOn * * @return $this */ public function setDate(\DateTime $date) { $this->propertyChanged('date', $this->date, $date); $this->date = $date; return $this; } /** * @return string */ public function getLabel() { return $this->label; } /** * @param string $label */ public function setLabel($label) { $this->propertyChanged('label', $this->label, $label); $this->label = $label; return $this; } /** * @return \DateTime */ public function getOpenedAt() { return $this->openedAt; } /** * @param \DateTime $submittedOn * * @return $this */ public function setOpenedAt(\DateTime $openedAt = null) { $this->propertyChanged('openedAt', $this->openedAt, $openedAt); $this->openedAt = $openedAt; return $this; } /** * @return \DateTime */ public function getClosedAt() { return $this->closedAt; } /** * @param \DateTime $submittedOn * * @return $this */ public function setClosedAt(\DateTime $closedAt = null) { $this->propertyChanged('closedAt', $this->closedAt, $closedAt); $this->closedAt = $closedAt; return $this; } /** * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @param \DateTime $createdAt * * @return $this */ public function setCreatedAt(\DateTime $createdAt) { $this->propertyChanged('createdAt', $this->createdAt, $createdAt); $this->createdAt = $createdAt; return $this; } /** * @return string */ public function getStatus() { if (null !== $this->getClosedAt()) { return self::STATUS_CLOSED; } if (null !== $this->getOpenedAt()) { return self::STATUS_OPENED; } return self::STATUS_WAITING; } public function hasStatusWaiting() { return self::STATUS_WAITING === $this->getStatus(); } public function hasStatusOpened() { return self::STATUS_OPENED === $this->getStatus(); } public function hasStatusClosed() { return self::STATUS_CLOSED === $this->getStatus(); } }