new ingest und profile settings

This commit is contained in:
team 1
2026-02-16 14:38:02 +01:00
parent ece93e4cb4
commit 8666b05570
15 changed files with 655 additions and 199 deletions

View File

@@ -0,0 +1,90 @@
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\IngestProfileRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: IngestProfileRepository::class)]
#[ORM\Table(name: 'ingest_profile')]
class IngestProfile
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private Uuid $id;
#[ORM\Column(type: 'integer')]
private int $version;
#[ORM\Column(type: 'integer')]
private int $chunkSize;
#[ORM\Column(type: 'integer')]
private int $chunkOverlap;
#[ORM\Column(type: 'string', length: 255)]
private string $embeddingModel;
#[ORM\Column(type: 'integer')]
private int $embeddingDimension;
#[ORM\Column(type: 'integer')]
private int $scoringVersion;
#[ORM\Column(type: 'boolean')]
private bool $active = false;
#[ORM\Column(type: 'boolean')]
private bool $reindexRequired = true;
#[ORM\Column(type: 'datetime_immutable')]
private \DateTimeImmutable $createdAt;
public function __construct(
int $version,
int $chunkSize,
int $chunkOverlap,
string $embeddingModel,
int $embeddingDimension,
int $scoringVersion
) {
$this->id = Uuid::v4();
$this->version = $version;
$this->chunkSize = $chunkSize;
$this->chunkOverlap = $chunkOverlap;
$this->embeddingModel = $embeddingModel;
$this->embeddingDimension = $embeddingDimension;
$this->scoringVersion = $scoringVersion;
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): Uuid { return $this->id; }
public function getVersion(): int { return $this->version; }
public function getChunkSize(): int { return $this->chunkSize; }
public function getChunkOverlap(): int { return $this->chunkOverlap; }
public function getEmbeddingModel(): string { return $this->embeddingModel; }
public function getEmbeddingDimension(): int { return $this->embeddingDimension; }
public function getScoringVersion(): int { return $this->scoringVersion; }
public function isActive(): bool { return $this->active; }
public function isReindexRequired(): bool { return $this->reindexRequired; }
public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; }
public function activate(): void
{
$this->active = true;
$this->reindexRequired = true;
}
public function deactivate(): void
{
$this->active = false;
}
public function markReindexDone(): void
{
$this->reindexRequired = false;
}
}