src/Entity/Recynews.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RecynewsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7.  * @ORM\Entity(repositoryClass=RecynewsRepository::class)
  8.  * @UniqueEntity("position", message="Cette position est déjà attribuer")
  9.  */
  10. class Recynews
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $position;
  22.     /**
  23.      * @ORM\Column(type="text")
  24.      */
  25.     private $content;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $title;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getPosition(): ?int
  35.     {
  36.         return $this->position;
  37.     }
  38.     public function setPosition(int $position): self
  39.     {
  40.         $this->position $position;
  41.         return $this;
  42.     }
  43.     public function getContent(): ?string
  44.     {
  45.         return $this->content;
  46.     }
  47.     public function setContent(string $content): self
  48.     {
  49.         $this->content $content;
  50.         return $this;
  51.     }
  52.     public function getTitle(): ?string
  53.     {
  54.         return $this->title;
  55.     }
  56.     public function setTitle(string $title): self
  57.     {
  58.         $this->title $title;
  59.         return $this;
  60.     }
  61. }