<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Fournisseur
* @ORM\Table(name="fournisseur", options={"collate"="latin1_general_ci","charset"="latin1"})
* @ORM\Entity(repositoryClass="App\Repository\FournisseurRepository")
* @ExclusionPolicy("all")
* @ORM\HasLifecycleCallbacks()
*/
class Fournisseur {
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @Expose
*/
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="datefr", type="date", nullable=false)
*/
private $datefr;
/**
* @var string
*
* @ORM\Column(name="user", type="string", length=11, nullable=true)
*/
private $user;
/**
* @var string
*
* @ORM\Column(name="password", type="string", length=11, nullable=true)
*/
private $password;
/**
* @var string
*
* @ORM\Column(name="source", type="string", length=10, nullable=false)
*/
private $source;
/**
* @var string
*
* @ORM\Column(name="famille", type="string", length=100, nullable=true)
*/
private $famille;
/**
* @var string
*
* @ORM\Column(name="nom", type="string", length=150, nullable=true)
* @Expose
*/
private $nom;
/**
* @var string
*
* @ORM\Column(name="raison", type="string", length=150, nullable=false)
*/
private $raison;
/**
* @var string
*
* @ORM\Column(name="contact", type="string", length=100, nullable=true)
*/
private $contact;
/**
* @var string
*
* @ORM\Column(name="fonction", type="string", length=100, nullable=true)
*/
private $fonction;
/**
* @var string
*
* @ORM\Column(name="comment", type="text", nullable=true)
*/
private $comment;
/**
* @var string
*
* @ORM\Column(name="adresse", type="string", length=150, nullable=true)
* @Expose
*/
private $adresse;
/**
* @var string
*
* @ORM\Column(name="cp", type="string", length=10, nullable=true)
* @Expose
*/
private $cp;
/**
* @var string
*
* @ORM\Column(name="ville", type="string", length=100, nullable=true)
* @Expose
*/
private $ville;
/**
* @var string
*
* @ORM\Column(name="pays", type="string", length=2, nullable=true)
* @Expose
*/
private $pays;
/**
* @var string
*
* @ORM\Column(name="tel", type="string", length=30, nullable=true)
*/
private $tel;
/**
* @var string
*
* @ORM\Column(name="mobile", type="string", length=30, nullable=true)
*/
private $mobile;
/**
* @var string
*
* @ORM\Column(name="fax", type="string", length=30, nullable=true)
*/
private $fax;
/**
* @var string
* @ORM\Column(name="email", type="string", length=150, nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="site", type="string", length=150, nullable=true)
*/
private $site;
/**
* @var float
* @ORM\Column(name="reversement", type="decimal", nullable=false, precision=8, scale=2)
*/
private $reversement;
/**
* @var boolean
*
* @ORM\Column(name="activite", type="boolean", nullable=false)
*/
private $activite;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Clientrelation", mappedBy="idfournisseur", cascade={"persist", "remove"})
*/
private $clientRelation;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $contactOuvertureNom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $contactOuverturePrenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $contactOuvertureEmail;
public function getContactOuvertureNom()
{
return $this->contactOuvertureNom;
}
public function setContactOuvertureNom($contactOuvertureNom)
{
$this->contactOuvertureNom = $contactOuvertureNom;
return $this;
}
public function getContactOuverturePrenom()
{
return $this->contactOuverturePrenom;
}
public function setContactOuverturePrenom( $contactOuverturePrenom)
{
$this->contactOuverturePrenom = $contactOuverturePrenom;
return $this;
}
public function getContactOuvertureEmail()
{
return $this->contactOuvertureEmail;
}
public function setContactOuvertureEmail( $contactOuvertureEmail)
{
$this->contactOuvertureEmail = $contactOuvertureEmail;
return $this;
}
public function __toString() {
return $this->nom." - ".$this->id;
}
public function __construct() {
$this->datefr = new \DateTime("now");
$this->source = 'malys';
$this->activite = true;
$this->reversement = false;
$this->raison = '';
}
/**
* @ORM\PrePersist
*/
public function prePersist() {
if ($this->nom == null) {
$this->nom = 'Nouveau fournisseur';
}
}
/**
* Get id
*
* @return integer
*/
public function getId() {
return $this->id;
}
/**
* Set datefr
*
* @param \DateTime $datefr
* @return Fournisseur
*/
public function setDatefr($datefr) {
$this->datefr = $datefr;
return $this;
}
/**
* Get datefr
*
* @return \DateTime
*/
public function getDatefr() {
return $this->datefr;
}
/**
* Set user
*
* @param string $user
* @return Fournisseur
*/
public function setUser($user) {
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return string
*/
public function getUser() {
return $this->user;
}
/**
* Set password
*
* @param string $password
* @return Fournisseur
*/
public function setPassword($password) {
$this->password = $password;
return $this;
}
/**
* Get password
*
* @return string
*/
public function getPassword() {
return $this->password;
}
/**
* Set source
*
* @param string $source
* @return Fournisseur
*/
public function setSource($source) {
$this->source = $source;
return $this;
}
/**
* Get source
*
* @return string
*/
public function getSource() {
return $this->source;
}
/**
* Set famille
*
* @param string $famille
* @return Fournisseur
*/
public function setFamille($famille) {
$this->famille = $famille;
return $this;
}
/**
* Get famille
*
* @return string
*/
public function getFamille() {
return $this->famille;
}
/**
* Set nom
*
* @param string $nom
* @return Fournisseur
*/
public function setNom($nom) {
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom() {
return $this->nom;
}
/**
* Set raison
*
* @param string $raison
* @return Fournisseur
*/
public function setRaison($raison) {
$this->raison = $raison;
return $this;
}
/**
* Get raison
*
* @return string
*/
public function getRaison() {
return $this->raison;
}
/**
* Set contact
*
* @param string $contact
* @return Fournisseur
*/
public function setContact($contact) {
$this->contact = $contact;
return $this;
}
/**
* Get contact
*
* @return string
*/
public function getContact() {
return $this->contact;
}
/**
* Set fonction
*
* @param string $fonction
* @return Fournisseur
*/
public function setFonction($fonction) {
$this->fonction = $fonction;
return $this;
}
/**
* Get fonction
*
* @return string
*/
public function getFonction() {
return $this->fonction;
}
/**
* Set comment
*
* @param string $comment
* @return Fournisseur
*/
public function setComment($comment) {
$this->comment = $comment;
return $this;
}
/**
* Get comment
*
* @return string
*/
public function getComment() {
return $this->comment;
}
/**
* Set adresse
*
* @param string $adresse
* @return Fournisseur
*/
public function setAdresse($adresse) {
$this->adresse = $adresse;
return $this;
}
/**
* Get adresse
*
* @return string
*/
public function getAdresse() {
return $this->adresse;
}
/**
* Set cp
*
* @param string $cp
* @return Fournisseur
*/
public function setCp($cp) {
$this->cp = $cp;
return $this;
}
/**
* Get cp
*
* @return string
*/
public function getCp() {
return $this->cp;
}
/**
* Set ville
*
* @param string $ville
* @return Fournisseur
*/
public function setVille($ville) {
$this->ville = $ville;
return $this;
}
/**
* Get ville
*
* @return string
*/
public function getVille() {
return $this->ville;
}
/**
* Set pays
*
* @param string $pays
* @return Fournisseur
*/
public function setPays($pays) {
$this->pays = $pays;
return $this;
}
/**
* Get pays
*
* @return string
*/
public function getPays() {
return $this->pays;
}
/**
* Set tel
*
* @param string $tel
* @return Fournisseur
*/
public function setTel($tel) {
$this->tel = $tel;
return $this;
}
/**
* Get tel
*
* @return string
*/
public function getTel() {
return $this->tel;
}
/**
* Set mobile
*
* @param string $mobile
* @return Fournisseur
*/
public function setMobile($mobile) {
$this->mobile = $mobile;
return $this;
}
/**
* Get mobile
*
* @return string
*/
public function getMobile() {
return $this->mobile;
}
/**
* Set fax
*
* @param string $fax
* @return Fournisseur
*/
public function setFax($fax) {
$this->fax = $fax;
return $this;
}
/**
* Get fax
*
* @return string
*/
public function getFax() {
return $this->fax;
}
/**
* Set email
*
* @param string $email
* @return Fournisseur
*/
public function setEmail($email) {
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail() {
return $this->email;
}
/**
* Set site
*
* @param string $site
* @return Fournisseur
*/
public function setSite($site) {
$this->site = $site;
return $this;
}
/**
* Get site
*
* @return string
*/
public function getSite() {
return $this->site;
}
/**
* Set reversement
*
* @param float $reversement
* @return Fournisseur
*/
public function setReversement($reversement) {
$this->reversement = $reversement;
return $this;
}
/**
* Get reversement
*
* @return float
*/
public function getReversement() {
return $this->reversement;
}
/**
* Set activite
*
* @param boolean $activite
* @return Fournisseur
*/
public function setActivite($activite) {
$this->activite = $activite;
return $this;
}
/**
* Get activite
*
* @return boolean
*/
public function getActivite() {
return $this->activite;
}
/**
* Get clientRelation
*
* @return \App\Entity\Clientrelation
*/
public function getClientRelation() {
return $this->clientRelation;
}
/**
* @return mixed
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* @param mixed $updatedAt
*/
public function setUpdatedAt($updatedAt): void
{
$this->updatedAt = $updatedAt;
}
}