createdBy = new NullAccount(); $this->createdAt = new \DateTimeImmutable(); } /** * Get id. * * @return int Model id * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * Set the status * * @param int $status Status * * @return void * * @since 1.0.0 */ public function setStatus(int $status) : void { $this->status = $status; } /** * Get the status * * @return int * * @since 1.0.0 */ public function getStatus() : int { return $this->status; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return [ 'id' => $this->id, 'title' => $this->title, 'content' => $this->content, 'list' => $this->list, 'ref' => $this->ref, 'status' => $this->status, 'createdAt' => $this->createdAt, 'createdBy' => $this->createdBy, ]; } /** * Get all media * * @return Media[] * * @since 1.0.0 */ public function getMedia() : array { return $this->media; } /** * Add media * * @param Media $media Media to add * * @return void * * @since 1.0.0 */ public function addMedia(Media $media) : void { $this->media[] = $media; } }