src/Entity/Vetoadom/SecteurPays.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * SecteurPays
  7.  *
  8.  * @ORM\Table(name="secteur_pays", indexes={@ORM\Index(name="FK_secteur_pays_secteur", columns={"secteur_id"}), @ORM\Index(name="FK_secteur_pays_pays", columns={"pays_id"})})
  9.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\SecteurPaysRepository")
  10.  */
  11. class SecteurPays
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string|null
  23.      *
  24.      * @ORM\Column(name="prefix_phone", type="string", length=2, nullable=true)
  25.      * @Assert\Length(
  26.      *      groups={"prefixPhone"},
  27.      *      max=2,
  28.      *      maxMessage="common.too_long"
  29.      *   )
  30.      */
  31.     private $prefixPhone;
  32.     /**
  33.      * @var \DateTime
  34.      *
  35.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  36.      */
  37.     private $dateModification;
  38.     /**
  39.      * @var \Pays
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="Pays")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="pays_id", referencedColumnName="id")
  44.      * })
  45.      */
  46.     private $pays;
  47.     /**
  48.      * @var \Secteur
  49.      *
  50.      * @ORM\ManyToOne(targetEntity="Secteur", inversedBy="secteurPays")
  51.      * @ORM\JoinColumns({
  52.      *   @ORM\JoinColumn(name="secteur_id", referencedColumnName="id")
  53.      * })
  54.      */
  55.     private $secteur;
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getPrefixPhone(): ?string
  61.     {
  62.         return $this->prefixPhone;
  63.     }
  64.     public function setPrefixPhone(?string $prefixPhone): self
  65.     {
  66.         if ($prefixPhone === ''$prefixPhone null;
  67.         $this->prefixPhone $prefixPhone;
  68.         return $this;
  69.     }
  70.     public function getDateModification(): ?\DateTimeInterface
  71.     {
  72.         return $this->dateModification;
  73.     }
  74.     public function setDateModification(\DateTimeInterface $dateModification): self
  75.     {
  76.         $this->dateModification $dateModification;
  77.         return $this;
  78.     }
  79.     public function getPays(): ?Pays
  80.     {
  81.         return $this->pays;
  82.     }
  83.     public function setPays(?Pays $pays): self
  84.     {
  85.         $this->pays $pays;
  86.         return $this;
  87.     }
  88.     public function getSecteur(): ?Secteur
  89.     {
  90.         return $this->secteur;
  91.     }
  92.     public function setSecteur(?Secteur $secteur): self
  93.     {
  94.         $this->secteur $secteur;
  95.         return $this;
  96.     }
  97. }