src/Entity/System/AttributeGroupLang.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="ps_attribute_group_lang",
  8. * uniqueConstraints={
  9. *
  10. * @ORM\UniqueConstraint(name="uk_attribute_group_language", columns={"attribute_group_id", "language_id"})
  11. * }
  12. * )
  13. *
  14. * @ORM\Entity(repositoryClass="App\Repository\System\AttributeGroupLangRepository")
  15. */
  16. class AttributeGroupLang
  17. {
  18. /**
  19. * @var int
  20. *
  21. * @ORM\Column(type="integer")
  22. *
  23. * @ORM\Id
  24. *
  25. * @ORM\GeneratedValue(strategy="AUTO")
  26. */
  27. private $id;
  28. /**
  29. * @var Language
  30. *
  31. * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  32. *
  33. * @ORM\JoinColumn(referencedColumnName="id_lang")
  34. */
  35. private $language;
  36. /**
  37. * @var AttributeGroup
  38. *
  39. * @ORM\ManyToOne(targetEntity="App\Entity\System\AttributeGroup", inversedBy="attributeGroupLangs", cascade={"persist"})
  40. *
  41. * @ORM\JoinColumn(referencedColumnName="id_attribute_group")
  42. */
  43. private $attributeGroup;
  44. /**
  45. * @var string
  46. *
  47. * @ORM\Column(type="string", length=100)
  48. */
  49. private $name;
  50. /**
  51. * @var string
  52. *
  53. * @ORM\Column(name="public_name", type="string", length=100)
  54. */
  55. private $publicName;
  56. public function getId(): ?int
  57. {
  58. return $this->id;
  59. }
  60. public function setId(int $id): AttributeGroupLang
  61. {
  62. $this->id = $id;
  63. return $this;
  64. }
  65. public function getLanguage(): ?Language
  66. {
  67. return $this->language;
  68. }
  69. public function setLanguage(?Language $language): AttributeGroupLang
  70. {
  71. $this->language = $language;
  72. return $this;
  73. }
  74. public function getAttributeGroup(): AttributeGroup
  75. {
  76. return $this->attributeGroup;
  77. }
  78. public function setAttributeGroup(AttributeGroup $attributeGroup): AttributeGroupLang
  79. {
  80. $this->attributeGroup = $attributeGroup;
  81. return $this;
  82. }
  83. public function getName(): string
  84. {
  85. return $this->name;
  86. }
  87. public function setName(string $name): AttributeGroupLang
  88. {
  89. $this->name = $name;
  90. return $this;
  91. }
  92. public function getPublicName(): string
  93. {
  94. return $this->publicName;
  95. }
  96. public function setPublicName(string $publicName): AttributeGroupLang
  97. {
  98. $this->publicName = $publicName;
  99. return $this;
  100. }
  101. }