src/Entity/ClientsType.php line 15

Open in your IDE?
  1. <?php
  2. /**
  3.  * ClientsType.php
  4.  * Created by Stéphane Brun
  5.  * Date: 11/05/2018 at 19:21
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="clients_type")
  12.  */
  13. class ClientsType
  14. {
  15.     const CLIENT 4;
  16.     const ECOLE_51 2;
  17.     const NON_51 3;
  18.     const EMPLOYE 0;
  19.     const COLLECTIVITE 1;
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     protected $id;
  26.     /**
  27.      * @ORM\Column(name="description", type="string", length=255)
  28.      */
  29.     protected $description;
  30.     /**
  31.      * Many ClientsType have Many Users.
  32.      *
  33.      * @ORM\ManyToMany(targetEntity="SysUsers", mappedBy="clientsTypes")
  34.      */
  35.     private $users;
  36.     public function __construct()
  37.     {
  38.         $this->users = new \Doctrine\Common\Collections\ArrayCollection();
  39.     }
  40.     public function __toString()
  41.     {
  42.         return $this->getId();
  43.     }
  44.     /**
  45.      * @return mixed
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * @return mixed
  53.      */
  54.     public function getDescription()
  55.     {
  56.         return $this->description;
  57.     }
  58.     /**
  59.      * @param mixed $description
  60.      */
  61.     public function setDescription($description)
  62.     {
  63.         $this->description $description;
  64.     }
  65.     /**
  66.      * @return mixed
  67.      */
  68.     public function getUsers()
  69.     {
  70.         return $this->users;
  71.     }
  72.     /**
  73.      * @param mixed $users
  74.      */
  75.     public function setUsers($users)
  76.     {
  77.         $this->users $users;
  78.     }
  79. }