src/Entity/Vs/VsBeginnAuswahl.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vs;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity]
  7. #[ORM\Table(name: 'vsbeginnauswahl')]
  8. class VsBeginnAuswahl implements \Stringable
  9. {
  10. #[ORM\Column(name: 'id', type: 'integer')]
  11. #[ORM\Id]
  12. #[ORM\GeneratedValue(strategy: 'AUTO')]
  13. private ?int $id = null;
  14. #[ORM\OneToMany(mappedBy: 'beginn_auswahl', targetEntity: Vs::class)]
  15. private Collection $vss;
  16. #[ORM\Column(name: 'beginn_auswahl', type: 'string', length: 200, unique: false, nullable: true)]
  17. private ?string $beginnAuswahl = null;
  18. public function __construct()
  19. {
  20. $this->vss = new ArrayCollection();
  21. }
  22. public function getId(): ?int
  23. {
  24. return $this->id;
  25. }
  26. public function getBeginnAuswahl(): ?string
  27. {
  28. return $this->beginnAuswahl;
  29. }
  30. public function setBeginnAuswahl(?string $beginnAuswahl): static
  31. {
  32. $this->beginnAuswahl = $beginnAuswahl;
  33. return $this;
  34. }
  35. #[\Override]
  36. public function __toString(): string
  37. {
  38. return $this->getBeginnAuswahl();
  39. }
  40. public function addVss(Vs $vss): static
  41. {
  42. $this->vss[] = $vss;
  43. return $this;
  44. }
  45. public function removeVss(Vs $vss): void
  46. {
  47. $this->vss->removeElement($vss);
  48. }
  49. public function getVss(): ArrayCollection|Collection
  50. {
  51. return $this->vss;
  52. }
  53. }