src/Entity/Carte.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CarteRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CarteRepository::class)
  7.  */
  8. class Carte
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $numero;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="cartes")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $user;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Assurance::class, inversedBy="cartes")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $assurance;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getNumero(): ?string
  35.     {
  36.         return $this->numero;
  37.     }
  38.     public function setNumero(string $numero): self
  39.     {
  40.         $this->numero $numero;
  41.         return $this;
  42.     }
  43.     public function getUser(): ?User
  44.     {
  45.         return $this->user;
  46.     }
  47.     public function setUser(?User $user): self
  48.     {
  49.         $this->user $user;
  50.         return $this;
  51.     }
  52.     public function getAssurance(): ?Assurance
  53.     {
  54.         return $this->assurance;
  55.     }
  56.     public function setAssurance(?Assurance $assurance): self
  57.     {
  58.         $this->assurance $assurance;
  59.         return $this;
  60.     }
  61. }