feat(composant) : create composant slot tables and migrate data from structure JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-12 18:20:31 +01:00
parent c01b71fe06
commit 5194543d16
4 changed files with 344 additions and 0 deletions

View File

@@ -106,6 +106,12 @@ class Product
#[ORM\OneToMany(mappedBy: 'product', targetEntity: Composant::class)]
private Collection $composants;
/**
* @var Collection<int, Piece>
*/
#[ORM\ManyToMany(targetEntity: Piece::class, mappedBy: 'products')]
private Collection $linkedPieces;
/**
* @var Collection<int, MachineProductLink>
*/
@@ -129,6 +135,7 @@ class Product
$this->customFieldValues = new ArrayCollection();
$this->pieces = new ArrayCollection();
$this->composants = new ArrayCollection();
$this->linkedPieces = new ArrayCollection();
$this->machineLinks = new ArrayCollection();
}
@@ -219,4 +226,12 @@ class Product
{
return $this->customFieldValues;
}
/**
* @return Collection<int, Piece>
*/
public function getLinkedPieces(): Collection
{
return $this->linkedPieces;
}
}