This commit is contained in:
marvin
2024-11-19 10:36:49 +01:00
parent 3abf0ff6c1
commit 1f803557aa
8 changed files with 19 additions and 99 deletions

View File

@@ -6,16 +6,15 @@ use App\Repository\EtatRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: EtatRepository::class)]
class Etat
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $idEtat = null;
private ?string $idEtat = null;
#[ORM\Column(length: 255)]
private ?string $libelle = null;
@@ -28,11 +27,10 @@ class Etat
public function __construct()
{
$this->idEtat = Uuid::v4(); // Génération automatique d'un UUID
$this->sorties = new ArrayCollection();
}
public function getIdEtat(): ?Uuid
public function getIdEtat(): ?string // Changement ici
{
return $this->idEtat;
}