src/Entity/Application/BonusTranslation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Application;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Behaviors\TranslationTrait;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. use JMS\Serializer\Annotation as Serializer;
  7. /**
  8. * @ORM\Table(name="app_bonus_translation")
  9. * @ORM\Entity(repositoryClass="App\Repository\TranslationRepository")
  10. * @ORM\HasLifecycleCallbacks()
  11. */
  12. class BonusTranslation implements TranslationInterface
  13. {
  14. use TranslationTrait;
  15. /**
  16. * @ORM\Column(type="string", length=2)
  17. */
  18. protected $locale;
  19. /**
  20. * @Serializer\Groups({"api","pointsHistory"})
  21. * @Serializer\SerializedName("name")
  22. * @ORM\Column(type="string", length=100)
  23. */
  24. private $name;
  25. /**
  26. * @Serializer\Groups({"api","pointsHistory"})
  27. * @Serializer\SerializedName("store")
  28. * @ORM\Column(type="string", length=100)
  29. */
  30. private $shopName;
  31. /**
  32. * @Serializer\Groups({"api"})
  33. * @Serializer\SerializedName("url")
  34. * @ORM\Column(type="string", length=200, nullable=true)
  35. */
  36. private $url;
  37. /**
  38. * @Serializer\Groups({"api"})
  39. * @Serializer\SerializedName("description")
  40. * @ORM\Column(type="text", nullable=true)
  41. */
  42. private $description;
  43. public function getName(): ?string
  44. {
  45. return trim($this->name);
  46. }
  47. public function setName(string $name): self
  48. {
  49. $this->name = $name;
  50. return $this;
  51. }
  52. public function getShopName(): ?string
  53. {
  54. return $this->shopName;
  55. }
  56. public function setShopName(string $shopName): self
  57. {
  58. $this->shopName = $shopName;
  59. return $this;
  60. }
  61. /**
  62. * Get Url
  63. *
  64. * @return mixed
  65. */
  66. public function getUrl()
  67. {
  68. return $this->url;
  69. }
  70. /**
  71. * Set Url
  72. *
  73. * @param mixed $url
  74. */
  75. public function setUrl( $url )
  76. {
  77. $this->url = $url;
  78. }
  79. /**
  80. * Get Description
  81. *
  82. * @return mixed
  83. */
  84. public function getDescription()
  85. {
  86. return $this->description;
  87. }
  88. /**
  89. * Set Description
  90. *
  91. * @param mixed $description
  92. */
  93. public function setDescription( $description )
  94. {
  95. $this->description = $description;
  96. }
  97. }