src/Entity/Vs/VsRubrik.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: 'vsrubrik')]
  8. class VsRubrik 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: 'rubrik', targetEntity: Vs::class)]
  15. private Collection $vss;
  16. #[ORM\Column(name: 'rubrikname', type: 'string', length: 200, unique: false, nullable: true)]
  17. private ?string $rubrikname = null;
  18. #[ORM\Column(name: 'beschreibung', type: 'text', length: 16, unique: false, nullable: true)]
  19. private ?string $beschreibung = null;
  20. public function __construct()
  21. {
  22. $this->vss = new ArrayCollection();
  23. }
  24. public function getId(): ?int
  25. {
  26. return $this->id;
  27. }
  28. public function getRubrikname(): ?string
  29. {
  30. return $this->rubrikname;
  31. }
  32. public function setRubrikname(?string $rubrikname): static
  33. {
  34. $this->rubrikname = $rubrikname;
  35. return $this;
  36. }
  37. public function getBeschreibung(): ?string
  38. {
  39. return $this->beschreibung;
  40. }
  41. public function setBeschreibung(?string $beschreibung): static
  42. {
  43. $this->beschreibung = $beschreibung;
  44. return $this;
  45. }
  46. public function addVss(Vs $vss): static
  47. {
  48. $this->vss[] = $vss;
  49. return $this;
  50. }
  51. public function removeVss(Vs $vss): void
  52. {
  53. $this->vss->removeElement($vss);
  54. }
  55. public function getVss(): ArrayCollection|Collection
  56. {
  57. return $this->vss;
  58. }
  59. #[\Override]
  60. public function __toString(): string
  61. {
  62. return $this->getRubrikname();
  63. }
  64. }