Files
TicketAssistent/app/DTOs/ClassificationResultDTO.php

23 lines
550 B
PHP

<?php
namespace App\DTOs;
class ClassificationResultDTO
{
public function __construct(
public readonly ?int $articleId,
public readonly float $confidence,
public readonly string $explanation,
public readonly array $rawResponse = []
) {}
public function toArray(): array
{
return [
'article_id' => $this->articleId,
'confidence' => $this->confidence,
'explanation' => $this->explanation,
'raw_response' => $this->rawResponse,
];
}
}