feat(Product.php): Ajoute la liaison ManyToMany avec l'entité Options
 feat(Devis.php): Ajoute la propriété isNotAddCaution pour masquer la caution
♻️ refactor(.env): Met à jour les URLs de SIGN, STRIPE et CONTRAT
 feat(workflow.twig): Adapte le workflow et supprime l'étape de caution
 feat(NewDevisType.php): Ajoute un champ pour gérer
This commit is contained in:
Serreau Jovann
2026-02-04 09:10:41 +01:00
parent d993a545d9
commit d23e75034c
16 changed files with 488 additions and 35 deletions

View File

@@ -108,6 +108,12 @@ class Product
#[ORM\Column(nullable: true, options: ['default' => true])]
private ?bool $isPublish = true;
/**
* @var Collection<int, Options>
*/
#[ORM\ManyToMany(targetEntity: Options::class, inversedBy: 'products')]
private Collection $options;
public function __construct()
{
$this->productReserves = new ArrayCollection();
@@ -116,6 +122,7 @@ class Product
$this->productPhotos = new ArrayCollection();
$this->productVideos = new ArrayCollection();
$this->productBlockeds = new ArrayCollection();
$this->options = new ArrayCollection();
$this->isPublish = true;
}
public function slug()
@@ -527,4 +534,28 @@ class Product
return $this;
}
/**
* @return Collection<int, Options>
*/
public function getOptions(): Collection
{
return $this->options;
}
public function addOption(Options $option): static
{
if (!$this->options->contains($option)) {
$this->options->add($option);
}
return $this;
}
public function removeOption(Options $option): static
{
$this->options->removeElement($option);
return $this;
}
}