<?php
/**
* Created by PhpStorm.
* User: fmartinbrossat
* Date: 2018-12-04
* Time: 15:30
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity
* @ORM\Table(name="clients_contacts")
*/
class ClientsContacts
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="nom", type="string", length=255, nullable=false)
*/
protected $nom;
/**
* @ORM\Column(name="prenom", type="string", length=255, nullable=false)
*/
protected $prenom;
/**
* @ORM\Column(name="telephone_bureau", type="string", length=150, nullable=true)
*/
protected $telephoneBureau;
/**
* @ORM\Column(name="telephone", type="string", length=150, nullable=true)
*/
protected $telephone;
/**
* @ORM\Column(name="mail", type="string", length=150, nullable=true)
*/
protected $mail;
/**
* @ORM\Column(name="fax", type="string", length=100, nullable=true)
*/
protected $fax;
/**
* @ORM\Column(name="commentaire", type="text", nullable=true)
*/
protected $commentaire;
/**
* has one Client
*
* @ORM\ManyToOne(targetEntity="App\Entity\Clients", inversedBy="clientsContacts")
* @ORM\JoinColumn(name="client_id", referencedColumnName="id", nullable=false))
*/
protected $client;
/**
* One ClientsContact has One SysUsers.
* @ORM\OneToOne(targetEntity="SysUsers", inversedBy="clientsContacts", cascade={"persist"})
* @ORM\JoinColumn(name="sys_user_id", referencedColumnName="id")
*/
protected $user;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getNom()
{
return $this->nom;
}
/**
* @param mixed $nom
*/
public function setNom($nom)
{
$this->nom = $nom;
}
/**
* @return mixed
*/
public function getPrenom()
{
return $this->prenom;
}
/**
* @param mixed $prenom
*/
public function setPrenom($prenom)
{
$this->prenom = $prenom;
}
/**
* @return mixed
*/
public function getTelephone()
{
return $this->telephone;
}
/**
* @param mixed $telephone
*/
public function setTelephone($telephone)
{
$this->telephone = $telephone;
}
/**
* @return mixed
*/
public function getMail()
{
return $this->mail;
}
/**
* @param mixed $mail
*/
public function setMail($mail)
{
$this->mail = $mail;
}
/**
* @return mixed
*/
public function getFax()
{
return $this->fax;
}
/**
* @param mixed $fax
*/
public function setFax($fax)
{
$this->fax = $fax;
}
/**
* @return mixed
*/
public function getCommentaire()
{
return $this->commentaire;
}
/**
* @param mixed $commentaire
*/
public function setCommentaire($commentaire)
{
$this->commentaire = $commentaire;
}
/**
* @return mixed
*/
public function getTelephoneBureau()
{
return $this->telephoneBureau;
}
/**
* @param mixed $telephoneBureau
*/
public function setTelephoneBureau($telephoneBureau)
{
$this->telephoneBureau = $telephoneBureau;
}
/**
* @return mixed
*/
public function getClient()
{
return $this->client;
}
/**
* @param mixed $client
*/
public function setClient($client)
{
$this->client = $client;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
public function accountIsActive() {
if (empty($this->user) || false === $this->user->isEnabled()) {
return false;
}
return true;
}
}