policy = $policy; $this->version = $version; $this->snapshot = $snapshot; $this->createdAt = time(); } public function getId(): ?int { return $this->id; } public function getPolicy(): Policy { return $this->policy; } public function getVersion(): int { return $this->version; } public function getSnapshot(): array { return $this->snapshot; } public function toArray(): array { return [ 'version' => $this->version, 'snapshot' => $this->snapshot, 'created_at' => $this->createdAt, ]; } }