<?php
/**
* StatistiquesProduits.php
* Created by Stéphane Brun
* Date: 23/08/2018 at 16:40
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="statistiques_produits")
*/
class StatistiquesProduits
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="mois", type="string", length=6)
*/
protected $mois;
/**
* @ORM\Column(name="vente_ferme", type="integer", nullable=true)
*/
protected $venteFerme = 0;
/**
* @ORM\Column(name="vente_coll", type="integer", nullable=true)
*/
protected $venteColl = 0;
/**
* @ORM\Column(name="vente_trans", type="integer", nullable=true)
*/
protected $venteTrans = 0;
/**
* @ORM\Column(name="vente_aj", type="integer", nullable=true)
*/
protected $venteAJ = 0;
/**
* @ORM\Column(name="achat_depot", type="integer", nullable=true)
*/
protected $achatDepot = 0;
/**
* @ORM\Column(name="achat_promo", type="integer", nullable=true)
*/
protected $achatPromo = 0;
/**
* @ORM\Column(name="achat_mep", type="integer", nullable=true)
*/
protected $achatMep = 0;
/**
* @ORM\Column(name="achat_solde", type="integer", nullable=true)
*/
protected $achatSolde = 0;
/**
* has one Titre
*
* @ORM\ManyToOne(targetEntity="App\Entity\Titre")
* @ORM\JoinColumn(name="titre_id", referencedColumnName="TISBN")
*/
protected $produit;
/**
* has one Company
*
* @ORM\ManyToOne(targetEntity="App\Entity\Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id")
*/
protected $company;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getMois()
{
return $this->mois;
}
/**
* @param mixed $mois
* @return StatistiquesProduits
*/
public function setMois($mois)
{
$this->mois = $mois;
return $this;
}
/**
* @return mixed
*/
public function getVenteFerme()
{
return $this->venteFerme;
}
/**
* @param mixed $venteFerme
* @return StatistiquesProduits
*/
public function setVenteFerme($venteFerme)
{
$this->venteFerme = $venteFerme;
return $this;
}
/**
* @return mixed
*/
public function getVenteColl()
{
return $this->venteColl;
}
/**
* @param mixed $venteColl
* @return StatistiquesProduits
*/
public function setVenteColl($venteColl)
{
$this->venteColl = $venteColl;
return $this;
}
/**
* @return mixed
*/
public function getVenteTrans()
{
return $this->venteTrans;
}
/**
* @param mixed $venteTrans
* @return StatistiquesProduits
*/
public function setVenteTrans($venteTrans)
{
$this->venteTrans = $venteTrans;
return $this;
}
/**
* @return mixed
*/
public function getVenteAJ()
{
return $this->venteAJ;
}
/**
* @param mixed $venteAJ
* @return StatistiquesProduits
*/
public function setVenteAJ($venteAJ)
{
$this->venteAJ = $venteAJ;
return $this;
}
/**
* @return mixed
*/
public function getAchatDepot()
{
return $this->achatDepot;
}
/**
* @param mixed $achatDepot
* @return StatistiquesProduits
*/
public function setAchatDepot($achatDepot)
{
$this->achatDepot = $achatDepot;
return $this;
}
/**
* @return mixed
*/
public function getAchatPromo()
{
return $this->achatPromo;
}
/**
* @param mixed $achatPromo
* @return StatistiquesProduits
*/
public function setAchatPromo($achatPromo)
{
$this->achatPromo = $achatPromo;
return $this;
}
/**
* @return mixed
*/
public function getAchatMep()
{
return $this->achatMep;
}
/**
* @param mixed $achatMep
* @return StatistiquesProduits
*/
public function setAchatMep($achatMep)
{
$this->achatMep = $achatMep;
return $this;
}
/**
* @return mixed
*/
public function getAchatSolde()
{
return $this->achatSolde;
}
/**
* @param mixed $achatSolde
* @return StatistiquesProduits
*/
public function setAchatSolde($achatSolde)
{
$this->achatSolde = $achatSolde;
return $this;
}
/**
* @return mixed
*/
public function getProduit()
{
return $this->produit;
}
/**
* @param mixed $produit
* @return StatistiquesProduits
*/
public function setProduit($produit)
{
$this->produit = $produit;
return $this;
}
/**
* @return mixed
*/
public function getCompany()
{
return $this->company;
}
/**
* @param mixed $company
* @return StatistiquesProduits
*/
public function setCompany($company)
{
$this->company = $company;
return $this;
}
public function getMoisInDateTime()
{
if (empty($this->getMois())) {
return null;
}
return \DateTime::createFromFormat('Ym-d H:i:s', $this->getMois().'-1 00:00:00');
}
}