Entité
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user