You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.3KB

  1. <?php
  2. namespace Lc\SovBundle\Model\Setting;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Model\File\FileInterface;
  5. #[ORM\MappedSuperclass]
  6. abstract class SettingModel implements SettingInterface
  7. {
  8. #[ORM\Column(type: 'string', length: 63, nullable: true)]
  9. protected $name;
  10. #[ORM\Column(type: 'text', nullable: true)]
  11. protected $text;
  12. #[ORM\Column(type: 'datetime', nullable: true)]
  13. protected $date;
  14. #[ORM\ManyToOne(targetEntity: FileInterface::class, cascade: ['persist', 'remove'])]
  15. protected $file;
  16. public function getName(): ?string
  17. {
  18. return $this->name;
  19. }
  20. public function setName(?string $name): self
  21. {
  22. $this->name = $name;
  23. return $this;
  24. }
  25. public function getText(): ?string
  26. {
  27. return $this->text;
  28. }
  29. public function setText($text): self
  30. {
  31. $this->text = $text;
  32. return $this;
  33. }
  34. public function getDate(): ?\DateTimeInterface
  35. {
  36. return $this->date;
  37. }
  38. public function setDate(?\DateTimeInterface $date): self
  39. {
  40. $this->date = $date;
  41. return $this;
  42. }
  43. public function getFile(): ?FileInterface
  44. {
  45. return $this->file;
  46. }
  47. public function setFile(?FileInterface $file): self
  48. {
  49. $this->file = $file;
  50. return $this;
  51. }
  52. }