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

104 行
2.1KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\ShopBundle\Model\AbstractEntity;
  6. /**
  7. * @ORM\MappedSuperclass
  8. */
  9. abstract class AbstractDocumentEntity extends AbstractEntity
  10. {
  11. use SortableTrait;
  12. /**
  13. * @ORM\Column(type="string", length=255)
  14. */
  15. protected $title;
  16. /**
  17. * @ORM\Column(type="string", length=255)
  18. * @Gedmo\Slug(fields={"title"})
  19. */
  20. protected $slug;
  21. /**
  22. * @ORM\Column(type="text", nullable=true)
  23. */
  24. protected $description;
  25. /**
  26. * @ORM\Column(type="string", length=255, nullable=true)
  27. */
  28. protected $image;
  29. /**
  30. * @ORM\Column(type="float")
  31. */
  32. protected $status;
  33. public function getTitle(): ?string
  34. {
  35. return $this->title;
  36. }
  37. public function setTitle(string $title): self
  38. {
  39. $this->title = $title;
  40. return $this;
  41. }
  42. public function getSlug(): ?string
  43. {
  44. return $this->slug;
  45. }
  46. public function setSlug(string $slug): self
  47. {
  48. $this->slug = $slug;
  49. return $this;
  50. }
  51. public function getDescription(): ?string
  52. {
  53. return $this->description;
  54. }
  55. public function setDescription(?string $description): self
  56. {
  57. $this->description = $description;
  58. return $this;
  59. }
  60. public function getImage(): ?string
  61. {
  62. return $this->image;
  63. }
  64. public function setImage(?string $image): self
  65. {
  66. $this->image = $image;
  67. return $this;
  68. }
  69. public function getStatus(): ?float
  70. {
  71. return $this->status;
  72. }
  73. public function setStatus(float $status): self
  74. {
  75. $this->status = $status;
  76. return $this;
  77. }
  78. }