src/Entity/SourceFinance.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SourceFinanceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SourceFinanceRepository::class)
  9.  * @UniqueEntity(fields={"wording"},message="Ce libelle est déjà utilisé." )
  10.  */
  11. class SourceFinance
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $wording;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getWording(): ?string
  28.     {
  29.         return $this->wording;
  30.     }
  31.     public function setWording(string $wording): self
  32.     {
  33.         $this->wording $wording;
  34.         return $this;
  35.     }
  36. }