createdAt = new \DateTimeImmutable('now'); $this->createdBy = new NullAccount(); $this->question = new NullQAQuestion(); } /** * Get id. * * @return int Model id * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * Get the answer * * @return string * * @since 1.0.0 */ public function getAnswer() : string { return $this->answer; } /** * Set the answer * * @param string $answer Answer * * @return void * * @since 1.0.0 */ public function setAnswer(string $answer) : void { $this->answer = $answer; } /** * Get the question * * @return QAQuestion * * @since 1.0.0 */ public function getQuestion() : QAQuestion { return $this->question; } /** * Set the question * * @param QAQuestion $question Question * * @return void * * @since 1.0.0 */ public function setQuestion(QAQuestion $question) : void { $this->question = $question; } /** * Get the status * * @return int * * @since 1.0.0 */ public function getStatus() : int { return $this->status; } /** * Set the status * * @param int $status Status * * @return void * * @since 1.0.0 */ public function setStatus(int $status) : void { $this->status = $status; } /** * Set the answer as accepted * * @param bool $accepted Accepted * * @return void * * @since 1.0.0 */ public function setAccepted(bool $accepted) : void { $this->isAccepted = $accepted; } /** * Is the answer accepted * * @return bool * * @since 1.0.0 */ public function isAccepted() : bool { return $this->isAccepted; } /** * {@inheritdoc} */ public function jsonSerialize() : array { return []; } }