employee = $employee; $this->start = new \DateTime('now'); $this->address = new Address(); } /** * Get id. * * @return int Model id * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'employee' => !\is_int($this->employee) ? $this->employee->getId() : $this->employee, 'jobTitle' => $this->jobTitle, 'start' => $this->start, 'end' => $this->end, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }