<?php
namespace App\Entity;
use App\Repository\CarteRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CarteRepository::class)
*/
class Carte
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $numero;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="cartes")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Assurance::class, inversedBy="cartes")
* @ORM\JoinColumn(nullable=false)
*/
private $assurance;
public function getId(): ?int
{
return $this->id;
}
public function getNumero(): ?string
{
return $this->numero;
}
public function setNumero(string $numero): self
{
$this->numero = $numero;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getAssurance(): ?Assurance
{
return $this->assurance;
}
public function setAssurance(?Assurance $assurance): self
{
$this->assurance = $assurance;
return $this;
}
}