src/Entity/ClientsContacts.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: fmartinbrossat
  5.  * Date: 2018-12-04
  6.  * Time: 15:30
  7.  */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. /**
  12.  * @ORM\Entity
  13.  * @ORM\Table(name="clients_contacts")
  14.  */
  15. class ClientsContacts
  16. {
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     protected $id;
  23.     /**
  24.      * @ORM\Column(name="nom", type="string", length=255, nullable=false)
  25.      */
  26.     protected $nom;
  27.     /**
  28.      * @ORM\Column(name="prenom", type="string", length=255, nullable=false)
  29.      */
  30.     protected $prenom;
  31.     /**
  32.      * @ORM\Column(name="telephone_bureau", type="string", length=150, nullable=true)
  33.      */
  34.     protected $telephoneBureau;
  35.     /**
  36.      * @ORM\Column(name="telephone", type="string", length=150, nullable=true)
  37.      */
  38.     protected $telephone;
  39.     /**
  40.      * @ORM\Column(name="mail", type="string", length=150, nullable=true)
  41.      */
  42.     protected $mail;
  43.     /**
  44.      * @ORM\Column(name="fax", type="string", length=100, nullable=true)
  45.      */
  46.     protected $fax;
  47.     /**
  48.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  49.      */
  50.     protected $commentaire;
  51.     /**
  52.      * has one Client
  53.      *
  54.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients", inversedBy="clientsContacts")
  55.      * @ORM\JoinColumn(name="client_id", referencedColumnName="id", nullable=false))
  56.      */
  57.     protected $client;
  58.     /**
  59.      * One ClientsContact has One SysUsers.
  60.      * @ORM\OneToOne(targetEntity="SysUsers", inversedBy="clientsContacts", cascade={"persist"})
  61.      * @ORM\JoinColumn(name="sys_user_id", referencedColumnName="id")
  62.      */
  63.     protected $user;
  64.     /**
  65.      * @return mixed
  66.      */
  67.     public function getId()
  68.     {
  69.         return $this->id;
  70.     }
  71.     /**
  72.      * @param mixed $id
  73.      */
  74.     public function setId($id)
  75.     {
  76.         $this->id $id;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getNom()
  82.     {
  83.         return $this->nom;
  84.     }
  85.     /**
  86.      * @param mixed $nom
  87.      */
  88.     public function setNom($nom)
  89.     {
  90.         $this->nom $nom;
  91.     }
  92.     /**
  93.      * @return mixed
  94.      */
  95.     public function getPrenom()
  96.     {
  97.         return $this->prenom;
  98.     }
  99.     /**
  100.      * @param mixed $prenom
  101.      */
  102.     public function setPrenom($prenom)
  103.     {
  104.         $this->prenom $prenom;
  105.     }
  106.     /**
  107.      * @return mixed
  108.      */
  109.     public function getTelephone()
  110.     {
  111.         return $this->telephone;
  112.     }
  113.     /**
  114.      * @param mixed $telephone
  115.      */
  116.     public function setTelephone($telephone)
  117.     {
  118.         $this->telephone $telephone;
  119.     }
  120.     /**
  121.      * @return mixed
  122.      */
  123.     public function getMail()
  124.     {
  125.         return $this->mail;
  126.     }
  127.     /**
  128.      * @param mixed $mail
  129.      */
  130.     public function setMail($mail)
  131.     {
  132.         $this->mail $mail;
  133.     }
  134.     /**
  135.      * @return mixed
  136.      */
  137.     public function getFax()
  138.     {
  139.         return $this->fax;
  140.     }
  141.     /**
  142.      * @param mixed $fax
  143.      */
  144.     public function setFax($fax)
  145.     {
  146.         $this->fax $fax;
  147.     }
  148.     /**
  149.      * @return mixed
  150.      */
  151.     public function getCommentaire()
  152.     {
  153.         return $this->commentaire;
  154.     }
  155.     /**
  156.      * @param mixed $commentaire
  157.      */
  158.     public function setCommentaire($commentaire)
  159.     {
  160.         $this->commentaire $commentaire;
  161.     }
  162.     /**
  163.      * @return mixed
  164.      */
  165.     public function getTelephoneBureau()
  166.     {
  167.         return $this->telephoneBureau;
  168.     }
  169.     /**
  170.      * @param mixed $telephoneBureau
  171.      */
  172.     public function setTelephoneBureau($telephoneBureau)
  173.     {
  174.         $this->telephoneBureau $telephoneBureau;
  175.     }
  176.     /**
  177.      * @return mixed
  178.      */
  179.     public function getClient()
  180.     {
  181.         return $this->client;
  182.     }
  183.     /**
  184.      * @param mixed $client
  185.      */
  186.     public function setClient($client)
  187.     {
  188.         $this->client $client;
  189.     }
  190.     /**
  191.      * @return mixed
  192.      */
  193.     public function getUser()
  194.     {
  195.         return $this->user;
  196.     }
  197.     /**
  198.      * @param mixed $user
  199.      */
  200.     public function setUser($user)
  201.     {
  202.         $this->user $user;
  203.     }
  204.     public function accountIsActive() {
  205.         if (empty($this->user) || false === $this->user->isEnabled()) {
  206.             return false;
  207.         }
  208.         return true;
  209.     }
  210. }