src/Entity/ColorDescription.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * ColorsDescription
  6. *
  7. * @ORM\Table(name="colors_description")
  8. * @ORM\Entity
  9. */
  10. class ColorDescription
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer", nullable=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\ManyToOne(targetEntity="App\Entity\Color", inversedBy="descriptions")
  22. * @ORM\JoinColumn(name="colors_id", referencedColumnName="colors_id", onDelete="CASCADE")
  23. */
  24. private $color;
  25. /**
  26. * @var \App\Entity\Language
  27. *
  28. * @ORM\ManyToOne(targetEntity="App\Entity\Language")
  29. * @ORM\JoinColumn(name="languages_id", referencedColumnName="languages_id")
  30. */
  31. private $language;
  32. /**
  33. * @var string|null
  34. *
  35. * @ORM\Column(name="colors_title", type="string", length=255, nullable=true)
  36. */
  37. private $title;
  38. public function getId(): int
  39. {
  40. return $this->id;
  41. }
  42. public function getColor(): ?Color
  43. {
  44. return $this->color;
  45. }
  46. public function getLanguage(): Language
  47. {
  48. return $this->language;
  49. }
  50. public function getTitle(): ?string
  51. {
  52. return $this->title;
  53. }
  54. public function setColor(?Color $color): void
  55. {
  56. $this->color = $color;
  57. }
  58. public function setLanguage(Language $language): void
  59. {
  60. $this->language = $language;
  61. }
  62. public function setTitle(?string $title): void
  63. {
  64. $this->title = $title;
  65. }
  66. }