feat(sync) : add version field and PieceProductSlot entity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-13 13:38:13 +01:00
parent 3f07162b94
commit 5210e53d73
4 changed files with 193 additions and 0 deletions

View File

@@ -130,6 +130,10 @@ class Composant
#[ORM\OrderBy(['position' => 'ASC'])]
private Collection $productSlots;
#[ORM\Column(type: Types::INTEGER, options: ['default' => 1])]
#[Groups(['composant:read'])]
private int $version = 1;
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, name: 'createdAt')]
#[Groups(['composant:read'])]
private DateTimeImmutable $createdAt;
@@ -406,4 +410,16 @@ class Composant
return $this;
}
public function getVersion(): int
{
return $this->version;
}
public function incrementVersion(): static
{
++$this->version;
return $this;
}
}