```
✨ feat(Product): Ajoute description et quantité aux produits, et formulaire associé.
```
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Repository\ProductRepository;
|
||||
use Cocur\Slugify\Slugify;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
use Vich\UploaderBundle\Mapping\Attribute\Uploadable;
|
||||
@@ -68,6 +69,12 @@ class Product
|
||||
#[ORM\OneToMany(targetEntity: ProductReserve::class, mappedBy: 'product')]
|
||||
private Collection $productReserves;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $description = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $qt = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->devisLines = new ArrayCollection();
|
||||
@@ -285,4 +292,28 @@ class Product
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDescription(): ?string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setDescription(?string $description): static
|
||||
{
|
||||
$this->description = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getQt(): ?int
|
||||
{
|
||||
return $this->qt;
|
||||
}
|
||||
|
||||
public function setQt(?int $qt): static
|
||||
{
|
||||
$this->qt = $qt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user