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