src/Entity/Vs/VsRegion.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: 'vsregion')]
  8. class VsRegion 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: 'region', targetEntity: Vs::class)]
  15. private Collection $vss;
  16. #[ORM\Column(type: 'string')]
  17. private ?string $regionname = 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 getRegionname(): ?string
  27. {
  28. return $this->regionname;
  29. }
  30. public function setRegionname(?string $regionname): static
  31. {
  32. $this->regionname = $regionname;
  33. return $this;
  34. }
  35. public function addVss(Vs $vss): static
  36. {
  37. $this->vss[] = $vss;
  38. return $this;
  39. }
  40. public function removeVss(Vs $vss): void
  41. {
  42. $this->vss->removeElement($vss);
  43. }
  44. public function getVss(): ArrayCollection|Collection|null
  45. {
  46. return $this->vss;
  47. }
  48. #[\Override]
  49. public function __toString(): string
  50. {
  51. return $this->getRegionname();
  52. }
  53. }