src/Entity/StatistiquesProduits.php line 16

Open in your IDE?
  1. <?php
  2. /**
  3.  * StatistiquesProduits.php
  4.  * Created by Stéphane Brun
  5.  * Date: 23/08/2018 at 16:40
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="statistiques_produits")
  12.  */
  13. class StatistiquesProduits
  14. {
  15.     /**
  16.      * @ORM\Column(type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     protected $id;
  21.     /**
  22.      * @ORM\Column(name="mois", type="string", length=6)
  23.      */
  24.     protected $mois;
  25.     /**
  26.      * @ORM\Column(name="vente_ferme", type="integer", nullable=true)
  27.      */
  28.     protected $venteFerme 0;
  29.     /**
  30.      * @ORM\Column(name="vente_coll", type="integer", nullable=true)
  31.      */
  32.     protected $venteColl 0;
  33.     /**
  34.      * @ORM\Column(name="vente_trans", type="integer", nullable=true)
  35.      */
  36.     protected $venteTrans 0;
  37.     /**
  38.      * @ORM\Column(name="vente_aj", type="integer", nullable=true)
  39.      */
  40.     protected $venteAJ 0;
  41.     /**
  42.      * @ORM\Column(name="achat_depot", type="integer", nullable=true)
  43.      */
  44.     protected $achatDepot 0;
  45.     /**
  46.      * @ORM\Column(name="achat_promo", type="integer", nullable=true)
  47.      */
  48.     protected $achatPromo 0;
  49.     /**
  50.      * @ORM\Column(name="achat_mep", type="integer", nullable=true)
  51.      */
  52.     protected $achatMep 0;
  53.     /**
  54.      * @ORM\Column(name="achat_solde", type="integer", nullable=true)
  55.      */
  56.     protected $achatSolde 0;
  57.     /**
  58.      * has one Titre
  59.      *
  60.      * @ORM\ManyToOne(targetEntity="App\Entity\Titre")
  61.      * @ORM\JoinColumn(name="titre_id", referencedColumnName="TISBN")
  62.      */
  63.     protected $produit;
  64.     /**
  65.      * has one Company
  66.      *
  67.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  68.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id")
  69.      */
  70.     protected $company;
  71.     /**
  72.      * @return mixed
  73.      */
  74.     public function getId()
  75.     {
  76.         return $this->id;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getMois()
  82.     {
  83.         return $this->mois;
  84.     }
  85.     /**
  86.      * @param mixed $mois
  87.      * @return StatistiquesProduits
  88.      */
  89.     public function setMois($mois)
  90.     {
  91.         $this->mois $mois;
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return mixed
  96.      */
  97.     public function getVenteFerme()
  98.     {
  99.         return $this->venteFerme;
  100.     }
  101.     /**
  102.      * @param mixed $venteFerme
  103.      * @return StatistiquesProduits
  104.      */
  105.     public function setVenteFerme($venteFerme)
  106.     {
  107.         $this->venteFerme $venteFerme;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return mixed
  112.      */
  113.     public function getVenteColl()
  114.     {
  115.         return $this->venteColl;
  116.     }
  117.     /**
  118.      * @param mixed $venteColl
  119.      * @return StatistiquesProduits
  120.      */
  121.     public function setVenteColl($venteColl)
  122.     {
  123.         $this->venteColl $venteColl;
  124.         return $this;
  125.     }
  126.     /**
  127.      * @return mixed
  128.      */
  129.     public function getVenteTrans()
  130.     {
  131.         return $this->venteTrans;
  132.     }
  133.     /**
  134.      * @param mixed $venteTrans
  135.      * @return StatistiquesProduits
  136.      */
  137.     public function setVenteTrans($venteTrans)
  138.     {
  139.         $this->venteTrans $venteTrans;
  140.         return $this;
  141.     }
  142.     /**
  143.      * @return mixed
  144.      */
  145.     public function getVenteAJ()
  146.     {
  147.         return $this->venteAJ;
  148.     }
  149.     /**
  150.      * @param mixed $venteAJ
  151.      * @return StatistiquesProduits
  152.      */
  153.     public function setVenteAJ($venteAJ)
  154.     {
  155.         $this->venteAJ $venteAJ;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return mixed
  160.      */
  161.     public function getAchatDepot()
  162.     {
  163.         return $this->achatDepot;
  164.     }
  165.     /**
  166.      * @param mixed $achatDepot
  167.      * @return StatistiquesProduits
  168.      */
  169.     public function setAchatDepot($achatDepot)
  170.     {
  171.         $this->achatDepot $achatDepot;
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return mixed
  176.      */
  177.     public function getAchatPromo()
  178.     {
  179.         return $this->achatPromo;
  180.     }
  181.     /**
  182.      * @param mixed $achatPromo
  183.      * @return StatistiquesProduits
  184.      */
  185.     public function setAchatPromo($achatPromo)
  186.     {
  187.         $this->achatPromo $achatPromo;
  188.         return $this;
  189.     }
  190.     /**
  191.      * @return mixed
  192.      */
  193.     public function getAchatMep()
  194.     {
  195.         return $this->achatMep;
  196.     }
  197.     /**
  198.      * @param mixed $achatMep
  199.      * @return StatistiquesProduits
  200.      */
  201.     public function setAchatMep($achatMep)
  202.     {
  203.         $this->achatMep $achatMep;
  204.         return $this;
  205.     }
  206.     /**
  207.      * @return mixed
  208.      */
  209.     public function getAchatSolde()
  210.     {
  211.         return $this->achatSolde;
  212.     }
  213.     /**
  214.      * @param mixed $achatSolde
  215.      * @return StatistiquesProduits
  216.      */
  217.     public function setAchatSolde($achatSolde)
  218.     {
  219.         $this->achatSolde $achatSolde;
  220.         return $this;
  221.     }
  222.     /**
  223.      * @return mixed
  224.      */
  225.     public function getProduit()
  226.     {
  227.         return $this->produit;
  228.     }
  229.     /**
  230.      * @param mixed $produit
  231.      * @return StatistiquesProduits
  232.      */
  233.     public function setProduit($produit)
  234.     {
  235.         $this->produit $produit;
  236.         return $this;
  237.     }
  238.     /**
  239.      * @return mixed
  240.      */
  241.     public function getCompany()
  242.     {
  243.         return $this->company;
  244.     }
  245.     /**
  246.      * @param mixed $company
  247.      * @return StatistiquesProduits
  248.      */
  249.     public function setCompany($company)
  250.     {
  251.         $this->company $company;
  252.         return $this;
  253.     }
  254.     public function getMoisInDateTime()
  255.     {
  256.         if (empty($this->getMois())) {
  257.             return null;
  258.         }
  259.         return \DateTime::createFromFormat('Ym-d H:i:s'$this->getMois().'-1 00:00:00');
  260.     }
  261. }