<?php
/**
* Departements.php
* Created by Stéphane Brun
* Date: 2018-03-29 at 13:11
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="tdepartements")
* @ORM\Entity(repositoryClass="App\Repository\DepartementsRepository")
*/
class Departements
{
const DEPARTEMENT_CHQ_CADEAU_REPENTIGNY = 57;
const DEPARTEMENT_CHQ_CADEAU_VERSAILLES = 205;
const DEPARTEMENT_CHQ_CADEAU_STHUBERT = 353;
const DEPARTEMENT_CHQ_CADEAU_ENTREPOT = 502;
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="ddesc", type="string", length=500)
*/
protected $description;
/**
* Many Departements has one Comptes
*
* @ORM\ManyToOne(targetEntity="App\Entity\Comptes", cascade={"persist"})
* @ORM\JoinColumn(name="dcompte", referencedColumnName="id", nullable=true)
*/
protected $compte;
/**
* has one Company
*
* @ORM\ManyToOne(targetEntity="App\Entity\Company", inversedBy="departements", cascade={"persist"})
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
*/
protected $company;
/**
* One Departement has Many TitreCompany.
* @ORM\OneToMany(targetEntity="TitreCompany", mappedBy="departement")
*/
protected $titresCompany;
/**
* @return mixed
*/
public function getCompany()
{
return $this->company;
}
/**
* @param Company $company
*/
public function setCompany(Company $company)
{
$this->company = $company;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param $id
* @return mixed
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getDescription()
{
return $this->description;
}
/**
* @param mixed $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return mixed
*/
public function getCompte()
{
return $this->compte;
}
/**
* @param Comptes $compte
* @return $this
*/
public function setCompte(Comptes $compte)
{
$this->compte = $compte;
return $this;
}
/**
* @return mixed
*/
public function getTitresCompany()
{
return $this->titresCompany;
}
/**
* @param mixed $titresCompany
*/
public function setTitresCompany($titresCompany)
{
$this->titresCompany = $titresCompany;
}
}