src/Entity/SettingNote.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity]
  6. class SettingNote
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(length255)]
  13.     private ?string $title null;
  14.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  15.     private ?string $content null;
  16.     #[ORM\ManyToOne(inversedBy'settingNotes')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Setting $setting null;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getTitle(): ?string
  24.     {
  25.         return $this->title;
  26.     }
  27.     public function setTitle(string $title): self
  28.     {
  29.         $this->title $title;
  30.         return $this;
  31.     }
  32.     public function getContent(): ?string
  33.     {
  34.         return $this->content;
  35.     }
  36.     public function setContent(?string $content): self
  37.     {
  38.         $this->content $content;
  39.         return $this;
  40.     }
  41.     public function getSetting(): ?Setting
  42.     {
  43.         return $this->setting;
  44.     }
  45.     public function setSetting(?Setting $setting): self
  46.     {
  47.         $this->setting $setting;
  48.         return $this;
  49.     }
  50.     public function __toString(): string
  51.     {
  52.         return $this->title ?? 'Nouvelle note';
  53.     }
  54. }