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

@@ -5,16 +5,15 @@ namespace App\Entity;
use App\Repository\SortieRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: SortieRepository::class)]
class Sortie
{
#[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 $idSortie = null;
private ?string $idSortie = null;
#[ORM\Column(length: 255)]
private ?string $nom = null;
@@ -50,12 +49,7 @@ class Sortie
#[ORM\JoinColumn(name: 'etat_id', referencedColumnName: 'idEtat', nullable: false)]
private ?Etat $etat = null;
public function __construct()
{
$this->idSortie = Uuid::v4();
}
public function getIdSortie(): ?Uuid
public function getIdSortie(): ?string
{
return $this->idSortie;
}