<?php
namespace App\Entity;
use App\Repository\AdresseRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AdresseRepository::class)]
class Adresse
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $pays;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $adresse;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $localite;
#[ORM\Column(type: 'integer', nullable: true)]
private $code_postale;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $titre;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'adresses')]
private $user;
#[ORM\ManyToOne(targetEntity: Gouvernorat::class, inversedBy: 'adresses')]
private $gouvernorat;
#[ORM\ManyToOne(targetEntity: Delegation::class, inversedBy: 'adresses')]
private $delegation;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getLocalite(): ?string
{
return $this->localite;
}
public function setLocalite(string $localite): self
{
$this->localite = $localite;
return $this;
}
public function getCodePostale(): ?int
{
return $this->code_postale;
}
public function setCodePostale(int $code_postale): self
{
$this->code_postale = $code_postale;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
// public function getEntreprise(): ?Entreprise
// {
// return $this->entreprise;
// }
// public function setEntreprise(?Entreprise $entreprise): self
// {
// $this->entreprise = $entreprise;
// return $this;
// }
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getGouvernorat(): ?Gouvernorat
{
return $this->gouvernorat;
}
public function setGouvernorat(?Gouvernorat $gouvernorat): self
{
$this->gouvernorat = $gouvernorat;
return $this;
}
public function getDelegation(): ?Delegation
{
return $this->delegation;
}
public function setDelegation(?Delegation $delegation): self
{
$this->delegation = $delegation;
return $this;
}
public function __toString()
{
return "Autres Adresses";
}
}