src/Entity/Pays.php line 9

Open in your IDE?
  1. <?php
  2. // src/Entity/Pays.php
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity]
  6. #[ORM\Table(name"pays")]
  7. class Pays
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\Column(type"smallint"options: ["unsigned" => true])]
  11.     #[ORM\GeneratedValue]
  12.     private ?int $id;
  13.     #[ORM\Column(type"integer"options: ["unsigned" => true])]
  14.     private ?int $code;
  15.     #[ORM\Column(type"string"length2uniquetrue)]
  16.     private ?string $alpha2;
  17.     #[ORM\Column(type"string"length3uniquetrue)]
  18.     private ?string $alpha3;
  19.     #[ORM\Column(type"string"length45)]
  20.     private ?string $nomEnGb;
  21.     #[ORM\Column(type"string"length45)]
  22.     private ?string $nomFrFr;
  23.     #[ORM\Column(type"string"length255)]
  24.     private ?string $tva;
  25.     // Getters and setters for each property
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.   
  31.     public function getCode(): ?int
  32.     {
  33.         return $this->code;
  34.     }
  35.     public function setCode(int $code): self
  36.     {
  37.         $this->code $code;
  38.         return $this;
  39.     }
  40.     public function getAlpha2(): ?string
  41.     {
  42.         return $this->alpha2;
  43.     }
  44.     public function setAlpha2(string $alpha2): self
  45.     {
  46.         $this->alpha2 $alpha2;
  47.         return $this;
  48.     }
  49.     public function getAlpha3(): ?string
  50.     {
  51.         return $this->alpha3;
  52.     }
  53.     public function setAlpha3(string $alpha3): self
  54.     {
  55.         $this->alpha3 $alpha3;
  56.         return $this;
  57.     }
  58.     public function getNomEnGb(): ?string
  59.     {
  60.         return $this->nomEnGb;
  61.     }
  62.     public function setNomEnGb(string $nomEnGb): self
  63.     {
  64.         $this->nomEnGb $nomEnGb;
  65.         return $this;
  66.     }
  67.     public function getNomFrFr(): ?string
  68.     {
  69.         return $this->nomFrFr;
  70.     }
  71.     public function setNomFrFr(string $nomFrFr): self
  72.     {
  73.         $this->nomFrFr $nomFrFr;
  74.         return $this;
  75.     }
  76.     public function getTva(): ?string
  77.     {
  78.         return $this->tva;
  79.     }
  80.     public function setTva(string $tva): self
  81.     {
  82.         $this->tva $tva;
  83.         return $this;
  84.     }
  85.     // Add getters and setters for other properties
  86.     public function __toString(): string
  87.     {
  88.         return $this->nomFrFr// ou tout autre champ que vous souhaitez utiliser pour la conversion en chaĆ®ne
  89.     }
  90. }