您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

51 行
1.3KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Newsletter;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
  5. use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
  6. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  7. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  8. use Lc\SovBundle\Model\Newsletter\NewsletterModel as SovNewsletterModel;
  9. /**
  10. * @ORM\MappedSuperclass()
  11. */
  12. abstract class NewsletterModel extends SovNewsletterModel implements FilterMerchantInterface, FilterSectionInterface
  13. {
  14. /**
  15. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="newsletters")
  16. */
  17. protected $merchant;
  18. /**
  19. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="newsletters")
  20. */
  21. protected $section;
  22. public function getMerchant(): ?MerchantInterface
  23. {
  24. return $this->merchant;
  25. }
  26. public function setMerchant(?MerchantInterface $merchant): self
  27. {
  28. $this->merchant = $merchant;
  29. return $this;
  30. }
  31. public function getSection(): ?SectionInterface
  32. {
  33. return $this->section;
  34. }
  35. public function setSection(?SectionInterface $section): self
  36. {
  37. $this->section = $section;
  38. return $this;
  39. }
  40. }