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