32 lines
806 B
PHP
32 lines
806 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\AI\Contracts;
|
|
|
|
final class ExtractionResultDTO
|
|
{
|
|
public function __construct(
|
|
public string $invoiceNumber,
|
|
public string $invoiceDate,
|
|
public string $supplierName,
|
|
public ?string $supplierTin,
|
|
public string $supplierAddress,
|
|
public ?string $buyerName,
|
|
public ?string $buyerTin,
|
|
public array $lines,
|
|
public float $subtotal,
|
|
public float $taxAmount,
|
|
public float $grand_total,
|
|
public string $currency,
|
|
public float $confidence,
|
|
public array $usage
|
|
) {}
|
|
}
|
|
|
|
interface AIProviderInterface
|
|
{
|
|
public function extractFromFile(string $filePath, string $mimeType): ExtractionResultDTO;
|
|
public function getProviderName(): string;
|
|
}
|