<?php
namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JsonSerializable;
/**
* TypeStock
*
* @ORM\Table(name="type_stock")
* @ORM\Entity(repositoryClass="App\Repository\TypeStockRepository")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
*/
class TypeStock implements JsonSerializable
{
const VENTE = "VNT";
const ISOLE = "ISO";
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="libelle", type="string", length=255)
*/
private $libelle;
/**
* @var string
*
* @ORM\Column(name="codecsp", type="string", length=3, nullable=true)
*/
private $codecsp;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=3, nullable=true)
*/
private $code;
/**
* @var DateTime
*
* @ORM\Column(name="deletedAt", type="datetime",nullable=true)
*/
private $deletedAt;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set libelle
*
* @param string $libelle
*
* @return TypeStock
*/
public function setLibelle($libelle)
{
$this->libelle = $libelle;
return $this;
}
/**
* Get libelle
*
* @return string
*/
public function getLibelle()
{
return $this->libelle;
}
/**
* Set codecsp
*
* @param string $codecsp
*
* @return TypeStock
*/
public function setCodecsp($codecsp)
{
$this->codecsp = $codecsp;
return $this;
}
/**
* Get codecsp
*
* @return string
*/
public function getCodecsp()
{
return $this->codecsp;
}
/**
* Set deletedAt
*
* @param DateTime $deletedAt
*
* @return TypeStock
*/
public function setDeletedAt($deletedAt)
{
$this->deletedAt = $deletedAt;
return $this;
}
/**
* Get deletedAt
*
* @return DateTime
*/
public function getDeletedAt()
{
return $this->deletedAt;
}
/**
* Set code
*
* @param string $code
*
* @return TypeStock
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
public function jsonSerialize(){
return array(
"libelle" =>$this->getLibelle(),
"codeCSP" => $this->getCodecsp()
);
}
}