entité
This commit is contained in:
@@ -41,8 +41,8 @@ class Participant
|
||||
#[ORM\Column]
|
||||
private ?string $password = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'participants')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
#[ORM\ManyToOne(targetEntity: Site::class, inversedBy: 'participants')]
|
||||
#[ORM\JoinColumn(name: 'site_id', referencedColumnName: 'idSite', nullable: false)]
|
||||
private ?Site $site = null;
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,25 +34,25 @@ class Sortie
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $infosSortie = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $état = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'sorties')]
|
||||
#[ORM\ManyToOne(targetEntity: Site::class, inversedBy: 'sorties')]
|
||||
#[ORM\JoinColumn(name: 'site_id', referencedColumnName: 'idSite', nullable: false)]
|
||||
private ?Site $site = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'sorties')]
|
||||
#[ORM\ManyToOne(targetEntity: Participant::class, inversedBy: 'sorties')]
|
||||
#[ORM\JoinColumn(name: 'participant_id', referencedColumnName: 'idParticipant', nullable: false)]
|
||||
private ?Participant $participant = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'sorties')]
|
||||
#[ORM\ManyToOne(targetEntity: Lieu::class, inversedBy: 'sorties')]
|
||||
#[ORM\JoinColumn(name: 'lieu_id', referencedColumnName: 'idLieu', nullable: false)]
|
||||
private ?Lieu $lieu = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'Sortie')]
|
||||
#[ORM\ManyToOne(targetEntity: Etat::class, inversedBy: 'sorties')]
|
||||
#[ORM\JoinColumn(name: 'etat_id', referencedColumnName: 'idEtat', nullable: false)]
|
||||
private ?Etat $etat = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// Génère un UUID automatiquement lors de la création de l'entité
|
||||
$this->idSortie = Uuid::v4();
|
||||
$this->idSortie = Uuid::v4(); // Génération automatique d'un UUID
|
||||
}
|
||||
|
||||
public function getIdSortie(): ?Uuid
|
||||
@@ -132,18 +132,6 @@ class Sortie
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getÉtat(): ?int
|
||||
{
|
||||
return $this->état;
|
||||
}
|
||||
|
||||
public function setÉtat(?int $état): self
|
||||
{
|
||||
$this->état = $état;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSite(): ?Site
|
||||
{
|
||||
return $this->site;
|
||||
@@ -185,7 +173,7 @@ class Sortie
|
||||
return $this->etat;
|
||||
}
|
||||
|
||||
public function setEtat(?Etat $etat): static
|
||||
public function setEtat(?Etat $etat): self
|
||||
{
|
||||
$this->etat = $etat;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user