vendor/roothirsch/pim-bundle/Entity/DataSource.php line 14

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\PimBundle\Entity;
  3. use App\Repository\DataSourceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=DataSourceRepository::class)
  7. * @ORM\Table(name="pim_data_source")
  8. * @ORM\InheritanceType("SINGLE_TABLE")
  9. * @ORM\DiscriminatorColumn(name="type", type="string")
  10. */
  11. class DataSource
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. */
  22. private $title;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=Category::class, inversedBy="dataSources")
  25. * @ORM\JoinColumn(nullable=false)
  26. */
  27. private $category;
  28. public function getId(): ?int
  29. {
  30. return $this->id;
  31. }
  32. public function getTitle(): ?string
  33. {
  34. return $this->title;
  35. }
  36. public function setTitle(string $title): self
  37. {
  38. $this->title = $title;
  39. return $this;
  40. }
  41. public function getCategory(): ?Category
  42. {
  43. return $this->category;
  44. }
  45. public function setCategory(?Category $category): self
  46. {
  47. $this->category = $category;
  48. return $this;
  49. }
  50. }