<?php
namespace App\Entity;
use App\Repository\ContactRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ContactRepository::class)
*/
class Contact
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $civilite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $fonction;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $service;
/**
* @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Length(
* min = 10,
* max = 20,
* minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $telephoneFixe;
/**
* @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Length(
* min = 10,
* max = 20,
* minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $telephoneMobile;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $adresse;
/**
* @ORM\Column(type="string", length=10, nullable=true)
* @Assert\Length(
* min = 5,
* max = 5,
* minMessage = "Le code postal doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le code postal ne doit pas comporter plus de {{ limit }} caractères",
* exactMessage = "Le code postal doit comporter {{ limit }} caractères"
* )
*/
private $codePostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $ville;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $statut;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $referent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Structure", inversedBy="contacts")
* @ORM\JoinColumn(nullable=false)
*/
private $structure;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setCivilite(?string $civilite): self
{
$this->civilite = $civilite;
return $this;
}
public function getFonction(): ?string
{
return $this->fonction;
}
public function setFonction(?string $fonction): self
{
$this->fonction = $fonction;
return $this;
}
public function getService(): ?string
{
return $this->service;
}
public function setService(?string $service): self
{
$this->service = $service;
return $this;
}
public function getTelephoneFixe(): ?string
{
return $this->telephoneFixe;
}
public function setTelephoneFixe(?string $telephoneFixe): self
{
$this->telephoneFixe = $telephoneFixe;
return $this;
}
public function getTelephoneMobile(): ?string
{
return $this->telephoneMobile;
}
public function setTelephoneMobile(?string $telephoneMobile): self
{
$this->telephoneMobile = $telephoneMobile;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(?string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCodePostal(?string $codePostal): self
{
$this->codePostal = $codePostal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getReferent(): ?bool
{
return $this->referent;
}
public function setReferent(?bool $referent): self
{
$this->referent = $referent;
return $this;
}
public function getStructure(): ?Structure
{
return $this->structure;
}
public function setStructure(?Structure $structure): self
{
$this->structure = $structure;
return $this;
}
}