src/Entity/Rayons.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * Rayons.php
  4.  * Created by Stéphane Brun
  5.  * Date: 2018-03-29 at 13:30
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="TRayons")
  12.  * @ORM\Entity(repositoryClass="App\Repository\RayonsRepository")
  13.  */
  14. class Rayons
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     /**
  23.      * @ORM\Column(name="RNom", type="string", length=50, nullable=true)
  24.      */
  25.     protected $nom;
  26.     /**
  27.      * @ORM\Column(name="ROrdre", type="integer", nullable=true)
  28.      */
  29.     protected $ordre;
  30.     /**
  31.      * @ORM\Column(name="rLONGUEUR", type="float", nullable=true)
  32.      */
  33.     protected $longueur;
  34.     /**
  35.      * @ORM\Column(name="RRayon", type="integer", nullable=true)
  36.      */
  37.     protected $rrayon;
  38.     /**
  39.      * Many Rayons has one Departements
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\Departements", cascade={"persist"})
  42.      * @ORM\JoinColumn(name="RDept", referencedColumnName="id", nullable=true)
  43.      */
  44.     protected $departement;
  45.     /**
  46.      * has one Company
  47.      *
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  49.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
  50.      */
  51.     protected $company;
  52.     
  53.     /**
  54.      * One Rayon has Many TitreCompany.
  55.      * @ORM\OneToMany(targetEntity="TitreCompany", mappedBy="rayon")
  56.      */
  57.     protected $titresCompany;
  58.     /**
  59.      * @return mixed
  60.      */
  61.     public function getCompany()
  62.     {
  63.         return $this->company;
  64.     }
  65.     /**
  66.      * @param Company $company
  67.      */
  68.     public function setCompany(Company $company)
  69.     {
  70.         $this->company $company;
  71.     }
  72.     /**
  73.      * @return mixed
  74.      */
  75.     public function getId()
  76.     {
  77.         return $this->id;
  78.     }
  79.     /**
  80.      * @param $id
  81.      */
  82.     public function setId($id)
  83.     {
  84.         $this->id $id;
  85.     }
  86.     /**
  87.      * @return mixed
  88.      */
  89.     public function getNom()
  90.     {
  91.         return $this->nom;
  92.     }
  93.     /**
  94.      * @param mixed $nom
  95.      */
  96.     public function setNom($nom)
  97.     {
  98.         $this->nom $nom;
  99.     }
  100.     /**
  101.      * @return mixed
  102.      */
  103.     public function getOrdre()
  104.     {
  105.         return $this->ordre;
  106.     }
  107.     /**
  108.      * @param mixed $ordre
  109.      */
  110.     public function setOrdre($ordre)
  111.     {
  112.         $this->ordre $ordre;
  113.     }
  114.     /**
  115.      * @return mixed
  116.      */
  117.     public function getLongueur()
  118.     {
  119.         return $this->longueur;
  120.     }
  121.     /**
  122.      * @param mixed $longueur
  123.      */
  124.     public function setLongueur($longueur)
  125.     {
  126.         $this->longueur $longueur;
  127.     }
  128.     /**
  129.      * @return mixed
  130.      */
  131.     public function getDepartement()
  132.     {
  133.         if ($this->departement) {
  134.             return $this->departement;
  135.         }
  136.         return false;
  137.     }
  138.     /**
  139.      * @param Departements $departement
  140.      * @return $this
  141.      */
  142.     public function setDepartement(Departements $departement)
  143.     {
  144.         $this->departement $departement;
  145.         return $this;
  146.     }
  147.     /**
  148.      * @return mixed
  149.      */
  150.     public function getRrayon()
  151.     {
  152.         return $this->rrayon;
  153.     }
  154.     /**
  155.      * @param mixed $rrayon
  156.      */
  157.     public function setRrayon($rrayon)
  158.     {
  159.         $this->rrayon $rrayon;
  160.     }
  161.     
  162.     /**
  163.      * @return mixed
  164.      */
  165.     public function getTitresCompany()
  166.     {
  167.         return $this->titresCompany;
  168.     }
  169.     
  170.     /**
  171.      * @param mixed $titresCompany
  172.      */
  173.     public function setTitresCompany($titresCompany)
  174.     {
  175.         $this->titresCompany $titresCompany;
  176.     }
  177. }