From a07fb89eefcc1e47291374486113866db72b71c9 Mon Sep 17 00:00:00 2001 From: marvin Date: Mon, 18 Nov 2024 14:53:09 +0100 Subject: [PATCH] =?UTF-8?q?entit=C3=A9=20sortie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entity/Sortie.php | 149 ++++++++++++++++++++++++++++ src/Repository/SortieRepository.php | 43 ++++++++ 2 files changed, 192 insertions(+) create mode 100644 src/Entity/Sortie.php create mode 100644 src/Repository/SortieRepository.php diff --git a/src/Entity/Sortie.php b/src/Entity/Sortie.php new file mode 100644 index 0000000..2213dce --- /dev/null +++ b/src/Entity/Sortie.php @@ -0,0 +1,149 @@ +id = Uuid::v4(); + } + + public function getId(): ?Uuid + { + return $this->id; + } + + public function getIdSortie(): ?int + { + return $this->idSortie; + } + + public function setIdSortie(int $idSortie): static + { + $this->idSortie = $idSortie; + + return $this; + } + + public function getNom(): ?string + { + return $this->nom; + } + + public function setNom(string $nom): static + { + $this->nom = $nom; + + return $this; + } + + public function getDateHeureDebut(): ?\DateTimeInterface + { + return $this->dateHeureDebut; + } + + public function setDateHeureDebut(?\DateTimeInterface $dateHeureDebut): static + { + $this->dateHeureDebut = $dateHeureDebut; + + return $this; + } + + public function getDurée(): ?int + { + return $this->durée; + } + + public function setDurée(?int $durée): static + { + $this->durée = $durée; + + return $this; + } + + public function getDateLimiteInscription(): ?\DateTimeInterface + { + return $this->dateLimiteInscription; + } + + public function setDateLimiteInscription(?\DateTimeInterface $dateLimiteInscription): static + { + $this->dateLimiteInscription = $dateLimiteInscription; + + return $this; + } + + public function getNbInscriptionsMax(): ?int + { + return $this->nbInscriptionsMax; + } + + public function setNbInscriptionsMax(?int $nbInscriptionsMax): static + { + $this->nbInscriptionsMax = $nbInscriptionsMax; + + return $this; + } + + public function getInfosSortie(): ?string + { + return $this->infosSortie; + } + + public function setInfosSortie(?string $infosSortie): static + { + $this->infosSortie = $infosSortie; + + return $this; + } + + public function getétat(): ?int + { + return $this->état; + } + + public function setétat(?int $état): static + { + $this->état = $état; + + return $this; + } +} diff --git a/src/Repository/SortieRepository.php b/src/Repository/SortieRepository.php new file mode 100644 index 0000000..e497d58 --- /dev/null +++ b/src/Repository/SortieRepository.php @@ -0,0 +1,43 @@ + + */ +class SortieRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Sortie::class); + } + + // /** + // * @return Sortie[] Returns an array of Sortie objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('s') + // ->andWhere('s.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('s.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Sortie + // { + // return $this->createQueryBuilder('s') + // ->andWhere('s.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +}