<?php
// src/Entity/Pays.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
#[ORM\Table(name: "pays")]
class Pays
{
#[ORM\Id]
#[ORM\Column(type: "smallint", options: ["unsigned" => true])]
#[ORM\GeneratedValue]
private ?int $id;
#[ORM\Column(type: "integer", options: ["unsigned" => true])]
private ?int $code;
#[ORM\Column(type: "string", length: 2, unique: true)]
private ?string $alpha2;
#[ORM\Column(type: "string", length: 3, unique: true)]
private ?string $alpha3;
#[ORM\Column(type: "string", length: 45)]
private ?string $nomEnGb;
#[ORM\Column(type: "string", length: 45)]
private ?string $nomFrFr;
#[ORM\Column(type: "string", length: 255)]
private ?string $tva;
// Getters and setters for each property
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?int
{
return $this->code;
}
public function setCode(int $code): self
{
$this->code = $code;
return $this;
}
public function getAlpha2(): ?string
{
return $this->alpha2;
}
public function setAlpha2(string $alpha2): self
{
$this->alpha2 = $alpha2;
return $this;
}
public function getAlpha3(): ?string
{
return $this->alpha3;
}
public function setAlpha3(string $alpha3): self
{
$this->alpha3 = $alpha3;
return $this;
}
public function getNomEnGb(): ?string
{
return $this->nomEnGb;
}
public function setNomEnGb(string $nomEnGb): self
{
$this->nomEnGb = $nomEnGb;
return $this;
}
public function getNomFrFr(): ?string
{
return $this->nomFrFr;
}
public function setNomFrFr(string $nomFrFr): self
{
$this->nomFrFr = $nomFrFr;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(string $tva): self
{
$this->tva = $tva;
return $this;
}
// Add getters and setters for other properties
public function __toString(): string
{
return $this->nomFrFr; // ou tout autre champ que vous souhaitez utiliser pour la conversion en chaƮne
}
}