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

69 行
1.5KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use App\Entity\Hub;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Lc\ShopBundle\Context\FilterMerchantInterface;
  6. use Lc\ShopBundle\Model\AbstractDocumentEntity;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9. * @ORM\MappedSuperclass()
  10. */
  11. abstract class News extends AbstractDocumentEntity implements FilterMerchantInterface
  12. {
  13. /**
  14. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="news")
  15. * @ORM\JoinColumn(nullable=false)
  16. */
  17. protected $merchant;
  18. /**
  19. * @ORM\Column(type="datetime")
  20. * @Gedmo\Timestampable(on="create")
  21. */
  22. protected $date;
  23. /**
  24. * @ORM\Column(type="boolean", nullable=true)
  25. */
  26. protected $isSent;
  27. public function getDate(): ?\DateTimeInterface
  28. {
  29. return $this->date;
  30. }
  31. public function setDate(\DateTimeInterface $date): self
  32. {
  33. $this->date = $date;
  34. return $this;
  35. }
  36. public function getMerchant(): ?Hub
  37. {
  38. return $this->merchant;
  39. }
  40. public function setMerchant(?Hub $merchant): self
  41. {
  42. $this->merchant = $merchant;
  43. return $this;
  44. }
  45. public function getIsSent(): ?bool
  46. {
  47. return $this->isSent;
  48. }
  49. public function setIsSent(?bool $isSent): self
  50. {
  51. $this->isSent = $isSent;
  52. return $this;
  53. }
  54. }