src/Entity/System/OrderStatusLanguage.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(
  7. * name="order_status_language",
  8. * uniqueConstraints={
  9. *
  10. * @ORM\UniqueConstraint(name="uk_status_language", columns={"order_status_id", "language_id"})
  11. * }
  12. * )
  13. *
  14. * @ORM\Entity(repositoryClass="App\Repository\System\OrderStatusLanguageRepository")
  15. */
  16. class OrderStatusLanguage
  17. {
  18. /**
  19. * @ORM\Id()
  20. *
  21. * @ORM\GeneratedValue()
  22. *
  23. * @ORM\Column(type="integer")
  24. */
  25. private int $id;
  26. /**
  27. * @ORM\ManyToOne(targetEntity="App\Entity\System\OrderStatus", inversedBy="orderStatusLanguages")
  28. *
  29. * @ORM\JoinColumn(referencedColumnName="id", nullable=false)
  30. */
  31. private OrderStatus $orderStatus;
  32. /**
  33. * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  34. *
  35. * @ORM\JoinColumn(referencedColumnName="id_lang", nullable=false)
  36. */
  37. private Language $language;
  38. /**
  39. * @ORM\Column(type="string", length=64)
  40. */
  41. private string $name;
  42. public function getId(): int
  43. {
  44. return $this->id;
  45. }
  46. public function setId(int $id): self
  47. {
  48. $this->id = $id;
  49. return $this;
  50. }
  51. public function getLanguage(): Language
  52. {
  53. return $this->language;
  54. }
  55. public function setLanguage(Language $language): self
  56. {
  57. $this->language = $language;
  58. return $this;
  59. }
  60. public function getOrderStatus(): OrderStatus
  61. {
  62. return $this->orderStatus;
  63. }
  64. public function setOrderStatus(OrderStatus $orderStatus): OrderStatusLanguage
  65. {
  66. $this->orderStatus = $orderStatus;
  67. return $this;
  68. }
  69. public function getName(): ?string
  70. {
  71. return $this->name;
  72. }
  73. public function setName(string $name): self
  74. {
  75. $this->name = $name;
  76. return $this;
  77. }
  78. }