src/Entity/Core/SelfStudy/SelfStudyForKidsCategories.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core\SelfStudy;
  3. use App\Entity\Core\Category;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table('self_study_for_kids_categories')]
  6. #[ORM\Entity]
  7. class SelfStudyForKidsCategories
  8. {
  9. #[ORM\Column(type: 'integer')]
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue(strategy: 'AUTO')]
  12. private int $id;
  13. #[ORM\Column(name: 'category_icon')]
  14. private string $categoryIcon;
  15. #[ORM\Column(name: 'category_background', nullable: true)]
  16. private ?string $categoryBackground;
  17. #[ORM\JoinColumn(name: 'category', onDelete: 'CASCADE')]
  18. #[ORM\ManyToOne(targetEntity: Category::class)]
  19. private Category $category;
  20. public function getId(): int
  21. {
  22. return $this->id;
  23. }
  24. public function getCategoryIcon(): string
  25. {
  26. return $this->categoryIcon;
  27. }
  28. public function getCategoryBackground(): ?string
  29. {
  30. return $this->categoryBackground;
  31. }
  32. public function getCategory(): Category
  33. {
  34. return $this->category;
  35. }
  36. }