id; } public function setId(int $id): static { $this->id = $id; return $this; } public function getFilename(): ?string { return $this->filename; } public function setFilename(string $filename): static { $this->filename = $filename; return $this; } public function getCaption(): ?string { return $this->caption; } public function setCaption(?string $caption): static { $this->caption = $caption; return $this; } public function getAuthor(): ?string { return $this->author; } public function setAuthor(?string $author): static { $this->author = $author; return $this; } public function getSite(): ?string { return $this->site; } public function setSite(?string $site): static { $this->site = $site; return $this; } public function getSequence(): ?int { return $this->sequence; } public function setSequence(int $sequence): static { $this->sequence = $sequence; return $this; } public function getType(): string { $type = ImageType::from($this->type); return $type->name; } public function setType(ImageType $type): static { $this->type = $type->value; return $this; } public function jsonSerialize(): array { return [ 'id' => $this->id, 'filename' => $this->filename, 'caption' => $this->caption, 'author' => $this->author, 'type' => $this->getType(), ]; } }