From 7f4e013d945d0deb4bc4ae7c41b5a50289b0e31f Mon Sep 17 00:00:00 2001 From: Maxiser Date: Thu, 10 Oct 2024 15:59:26 +0200 Subject: [PATCH] Entity and Repository --- src/Entity/Fault.php | 35 +++++++ src/Entity/Intervention.php | 96 +++++++++++++++++++ src/Entity/Skill.php | 50 ++++++++++ src/Entity/Stock.php | 65 +++++++++++++ src/Entity/User.php | 112 ++++++++++++++++++++++ src/Entity/Vehicle.php | 50 ++++++++++ src/Repository/FaultRepository.php | 43 +++++++++ src/Repository/InterventionRepository.php | 43 +++++++++ src/Repository/SkillRepository.php | 43 +++++++++ src/Repository/StockRepository.php | 43 +++++++++ src/Repository/VehicleRepository.php | 43 +++++++++ 11 files changed, 623 insertions(+) create mode 100644 src/Entity/Fault.php create mode 100644 src/Entity/Intervention.php create mode 100644 src/Entity/Skill.php create mode 100644 src/Entity/Stock.php create mode 100644 src/Entity/User.php create mode 100644 src/Entity/Vehicle.php create mode 100644 src/Repository/FaultRepository.php create mode 100644 src/Repository/InterventionRepository.php create mode 100644 src/Repository/SkillRepository.php create mode 100644 src/Repository/StockRepository.php create mode 100644 src/Repository/VehicleRepository.php diff --git a/src/Entity/Fault.php b/src/Entity/Fault.php new file mode 100644 index 0000000..7842413 --- /dev/null +++ b/src/Entity/Fault.php @@ -0,0 +1,35 @@ +id; + } + + public function getWording(): ?string + { + return $this->Wording; + } + + public function setWording(string $Wording): static + { + $this->Wording = $Wording; + + return $this; + } +} diff --git a/src/Entity/Intervention.php b/src/Entity/Intervention.php new file mode 100644 index 0000000..51fde19 --- /dev/null +++ b/src/Entity/Intervention.php @@ -0,0 +1,96 @@ +id; + } + + public function getWording(): ?string + { + return $this->Wording; + } + + public function setWording(string $Wording): static + { + $this->Wording = $Wording; + + return $this; + } + + public function getTimestamp(): ?\DateTimeInterface + { + return $this->Timestamp; + } + + public function setTimestamp(\DateTimeInterface $Timestamp): static + { + $this->Timestamp = $Timestamp; + + return $this; + } + + public function getDescription(): ?string + { + return $this->Description; + } + + public function setDescription(string $Description): static + { + $this->Description = $Description; + + return $this; + } + + public function getAddress(): ?string + { + return $this->Address; + } + + public function setAddress(string $Address): static + { + $this->Address = $Address; + + return $this; + } + + public function getStatus(): ?string + { + return $this->Status; + } + + public function setStatus(string $Status): static + { + $this->Status = $Status; + + return $this; + } +} diff --git a/src/Entity/Skill.php b/src/Entity/Skill.php new file mode 100644 index 0000000..ca8c6a3 --- /dev/null +++ b/src/Entity/Skill.php @@ -0,0 +1,50 @@ +id; + } + + public function getWording(): ?string + { + return $this->Wording; + } + + public function setWording(string $Wording): static + { + $this->Wording = $Wording; + + return $this; + } + + public function getDescription(): ?string + { + return $this->Description; + } + + public function setDescription(string $Description): static + { + $this->Description = $Description; + + return $this; + } +} diff --git a/src/Entity/Stock.php b/src/Entity/Stock.php new file mode 100644 index 0000000..106e16f --- /dev/null +++ b/src/Entity/Stock.php @@ -0,0 +1,65 @@ +id; + } + + public function getWording(): ?string + { + return $this->Wording; + } + + public function setWording(string $Wording): static + { + $this->Wording = $Wording; + + return $this; + } + + public function getDescription(): ?string + { + return $this->Description; + } + + public function setDescription(string $Description): static + { + $this->Description = $Description; + + return $this; + } + + public function getQuantity(): ?string + { + return $this->Quantity; + } + + public function setQuantity(string $Quantity): static + { + $this->Quantity = $Quantity; + + return $this; + } +} diff --git a/src/Entity/User.php b/src/Entity/User.php new file mode 100644 index 0000000..3a2f4d1 --- /dev/null +++ b/src/Entity/User.php @@ -0,0 +1,112 @@ +id; + } + + public function getFirstName(): ?string + { + return $this->FirstName; + } + + public function setFirstName(string $FirstName): static + { + $this->FirstName = $FirstName; + + return $this; + } + + public function getLastName(): ?string + { + return $this->LastName; + } + + public function setLastName(string $LastName): static + { + $this->LastName = $LastName; + + return $this; + } + + public function getBirthDate(): ?\DateTimeInterface + { + return $this->BirthDate; + } + + public function setBirthDate(\DateTimeInterface $BirthDate): static + { + $this->BirthDate = $BirthDate; + + return $this; + } + + public function getEmail(): ?string + { + return $this->Email; + } + + public function setEmail(string $Email): static + { + $this->Email = $Email; + + return $this; + } + + public function getPhone(): ?string + { + return $this->Phone; + } + + public function setPhone(string $Phone): static + { + $this->Phone = $Phone; + + return $this; + } + + public function getType(): ?string + { + return $this->Type; + } + + public function setType(string $Type): static + { + $this->Type = $Type; + + return $this; + } +} diff --git a/src/Entity/Vehicle.php b/src/Entity/Vehicle.php new file mode 100644 index 0000000..6f6a178 --- /dev/null +++ b/src/Entity/Vehicle.php @@ -0,0 +1,50 @@ +id; + } + + public function getLicensePlate(): ?string + { + return $this->LicensePlate; + } + + public function setLicensePlate(string $LicensePlate): static + { + $this->LicensePlate = $LicensePlate; + + return $this; + } + + public function getBrand(): ?string + { + return $this->Brand; + } + + public function setBrand(string $Brand): static + { + $this->Brand = $Brand; + + return $this; + } +} diff --git a/src/Repository/FaultRepository.php b/src/Repository/FaultRepository.php new file mode 100644 index 0000000..a40d1fa --- /dev/null +++ b/src/Repository/FaultRepository.php @@ -0,0 +1,43 @@ + + */ +class FaultRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Fault::class); + } + + // /** + // * @return Fault[] Returns an array of Fault objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('f') + // ->andWhere('f.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('f.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Fault + // { + // return $this->createQueryBuilder('f') + // ->andWhere('f.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/InterventionRepository.php b/src/Repository/InterventionRepository.php new file mode 100644 index 0000000..a6bcd03 --- /dev/null +++ b/src/Repository/InterventionRepository.php @@ -0,0 +1,43 @@ + + */ +class InterventionRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Intervention::class); + } + + // /** + // * @return Intervention[] Returns an array of Intervention objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('i') + // ->andWhere('i.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('i.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Intervention + // { + // return $this->createQueryBuilder('i') + // ->andWhere('i.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/SkillRepository.php b/src/Repository/SkillRepository.php new file mode 100644 index 0000000..dd659e5 --- /dev/null +++ b/src/Repository/SkillRepository.php @@ -0,0 +1,43 @@ + + */ +class SkillRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Skill::class); + } + + // /** + // * @return Skill[] Returns an array of Skill 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): ?Skill + // { + // return $this->createQueryBuilder('s') + // ->andWhere('s.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/StockRepository.php b/src/Repository/StockRepository.php new file mode 100644 index 0000000..5eb10ae --- /dev/null +++ b/src/Repository/StockRepository.php @@ -0,0 +1,43 @@ + + */ +class StockRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Stock::class); + } + + // /** + // * @return Stock[] Returns an array of Stock 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): ?Stock + // { + // return $this->createQueryBuilder('s') + // ->andWhere('s.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/VehicleRepository.php b/src/Repository/VehicleRepository.php new file mode 100644 index 0000000..b72665e --- /dev/null +++ b/src/Repository/VehicleRepository.php @@ -0,0 +1,43 @@ + + */ +class VehicleRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Vehicle::class); + } + + // /** + // * @return Vehicle[] Returns an array of Vehicle objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('v') + // ->andWhere('v.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('v.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Vehicle + // { + // return $this->createQueryBuilder('v') + // ->andWhere('v.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +}