src/Entity/Departements.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * Departements.php
  4.  * Created by Stéphane Brun
  5.  * Date: 2018-03-29 at 13:11
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="tdepartements")
  12.  * @ORM\Entity(repositoryClass="App\Repository\DepartementsRepository")
  13.  */
  14. class Departements
  15. {
  16.     const DEPARTEMENT_CHQ_CADEAU_REPENTIGNY 57;
  17.     const DEPARTEMENT_CHQ_CADEAU_VERSAILLES 205;
  18.     const DEPARTEMENT_CHQ_CADEAU_STHUBERT 353;
  19.     const DEPARTEMENT_CHQ_CADEAU_ENTREPOT 502;
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     protected $id;
  26.     /**
  27.      * @ORM\Column(name="ddesc", type="string", length=500)
  28.      */
  29.     protected $description;
  30.     /**
  31.      * Many Departements has one Comptes
  32.      *
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Comptes", cascade={"persist"})
  34.      * @ORM\JoinColumn(name="dcompte", referencedColumnName="id", nullable=true)
  35.      */
  36.     protected $compte;
  37.     /**
  38.      * has one Company
  39.      *
  40.      * @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="departements", cascade={"persist"})
  41.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
  42.      */
  43.     protected $company;
  44.     /**
  45.      * One Departement has Many TitreCompany.
  46.      * @ORM\OneToMany(targetEntity="TitreCompany", mappedBy="departement")
  47.      */
  48.     protected $titresCompany;
  49.     /**
  50.      * @return mixed
  51.      */
  52.     public function getCompany()
  53.     {
  54.         return $this->company;
  55.     }
  56.     /**
  57.      * @param Company $company
  58.      */
  59.     public function setCompany(Company $company)
  60.     {
  61.         $this->company $company;
  62.     }
  63.     /**
  64.      * @return mixed
  65.      */
  66.     public function getId()
  67.     {
  68.         return $this->id;
  69.     }
  70.     /**
  71.      * @param $id
  72.      * @return mixed
  73.      */
  74.     public function setId($id)
  75.     {
  76.         $this->id $id;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getDescription()
  82.     {
  83.         return $this->description;
  84.     }
  85.     /**
  86.      * @param mixed $description
  87.      */
  88.     public function setDescription($description)
  89.     {
  90.         $this->description $description;
  91.     }
  92.     /**
  93.      * @return mixed
  94.      */
  95.     public function getCompte()
  96.     {
  97.         return $this->compte;
  98.     }
  99.     /**
  100.      * @param Comptes $compte
  101.      * @return $this
  102.      */
  103.     public function setCompte(Comptes $compte)
  104.     {
  105.         $this->compte $compte;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return mixed
  110.      */
  111.     public function getTitresCompany()
  112.     {
  113.         return $this->titresCompany;
  114.     }
  115.     /**
  116.      * @param mixed $titresCompany
  117.      */
  118.     public function setTitresCompany($titresCompany)
  119.     {
  120.         $this->titresCompany $titresCompany;
  121.     }
  122. }