src/Entity/Rangements/Caisse.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Rangements;
  3. use App\Entity\Articles\Finition;
  4. use App\Entity\Clients\Client;
  5. use App\Entity\GestionComerciale\Commande;
  6. use App\Entity\GestionComerciale\RaisonAnomalie;
  7. use App\Entity\Transporteurs\Transporteur;
  8. use App\Entity\Utilisateur\Utilisateur;
  9. use DateTime;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Gedmo\Mapping\Annotation as Gedmo;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use Doctrine\ORM\Mapping\Index;
  14. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  15. use App\Annotations\SecuredEntity;
  16. /**
  17.  * Caisse
  18.  *
  19.  * @ORM\Table("rangement__caisse")
  20.  * @ORM\Entity(repositoryClass="App\Repository\Rangements\CaisseRepository")
  21.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  22.  * @UniqueEntity("libelle",message="Libellé déja utilisé")
  23.  * @ORM\HasLifecycleCallbacks()*
  24.  * @SecuredEntity(name="Chariot",group="REGLAGES")
  25.  */
  26. class Caisse
  27. {
  28.     const TYPE_EMBALLAGE 0;
  29.     const TYPE_OPTION 1;
  30.     /**
  31.      * @ORM\Column(name="id", type="integer")
  32.      * @ORM\Id
  33.      * @ORM\GeneratedValue(strategy="AUTO")
  34.      */
  35.     private $id;
  36.     /**
  37.      * @ORM\Column(name="statut_caisse_id", type="integer", nullable=true)
  38.      */
  39.     private $statutCaisse;
  40.     /**
  41.      * @ORM\Column(name="hauteur", type="float", nullable=true)
  42.      */
  43.     private $hauteur;
  44.     /**
  45.      * @ORM\Column(name="largeur", type="float", nullable=true)
  46.      */
  47.     private $largeur;
  48.     /**
  49.      * @ORM\Column(name="longueur", type="float", nullable=true)
  50.      */
  51.     private $longueur;
  52.     /**
  53.      * @var integer
  54.      *
  55.      * @ORM\Column(name="nbEtageres", type="integer", nullable=true)
  56.      */
  57.     private $nbEtageres;
  58.     /**
  59.      * @var integer
  60.      *
  61.      * @ORM\Column(name="pourcentage_occupation", type="integer", nullable=true)
  62.      */
  63.     private $pourcentageOccupation;
  64.     /**
  65.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  66.      * @ORM\JoinColumn(nullable=true)
  67.      */
  68.     private $utilisateur;
  69.     /**
  70.      * @ORM\Column(name="libelle", type="string", length=255,nullable=true)
  71.      * @Assert\NotBlank(message="Libellé obligatoire")
  72.      */
  73.     private $libelle;
  74.     /**
  75.      * @ORM\Column(name="couleur", type="string", length=255,nullable=true)
  76.      */
  77.     private $couleur;
  78.     /**
  79.      * @ORM\Column(name="ean", type="string", length=255,nullable=true)
  80.      */
  81.     private $ean;
  82.     /**
  83.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  84.      */
  85.     private $dateMaj;
  86.     /**
  87.      * @ORM\Column(name="date_supression", type="datetime", nullable=true)
  88.      */
  89.     private $dateSuppression;
  90.     /**
  91.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client", inversedBy="commandes", cascade={"persist"})
  92.      * @ORM\JoinColumn(nullable=true)
  93.      */
  94.     private $client;
  95.     /**
  96.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\Commande", cascade={"persist"})
  97.      * @ORM\JoinColumn(nullable=true)
  98.      */
  99.     private $commande;
  100.     /**
  101.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\Transporteur", cascade={"persist"})
  102.      * @ORM\JoinColumn(nullable=true)
  103.      */
  104.     private $transporteur;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $couleurTexte;
  109.     /**
  110.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\RaisonAnomalie",  cascade={"persist"})
  111.      * @ORM\JoinColumn(nullable=true)
  112.      */
  113.     private $raisonAnomalie;
  114.     /**
  115.      * @ORM\Column(type="text", nullable=true)
  116.      */
  117.     private $commentaireAnomalie;
  118.     /**
  119.      * @ORM\Column(name="type_id", type="integer", nullable=true)
  120.      */
  121.     private $type;
  122.     /**
  123.      * @ORM\ManyToOne(targetEntity="App\Entity\Articles\Finition", cascade={"persist"})
  124.      */
  125.     private $finition;
  126.     /**
  127.      * @ORM\Column(type="string", length=255, nullable=true)
  128.      */
  129.     private $md5AdresseLivraison;
  130.     public function __construct(){
  131.         $this->dateMaj = new Datetime();
  132.         $this->couleur '#000000';
  133.         $this->couleurTexte '#ffffff';
  134.     }
  135.     public function getId(): int
  136.     {
  137.         return $this->id;
  138.     }
  139.     public function setLibelle(?string $libelle): Caisse
  140.     {
  141.         $this->libelle $libelle;
  142.         return $this;
  143.     }
  144.     public function getLibelle(): ?string
  145.     {
  146.         return $this->libelle;
  147.     }
  148.     public function setEan(?string $ean): Caisse
  149.     {
  150.         $this->ean $ean;
  151.         return $this;
  152.     }
  153.     public function getEan(): ?string
  154.     {
  155.         return $this->ean;
  156.     }
  157.     public function setDateMaj(?DateTime $dateMaj): Caisse
  158.     {
  159.         $this->dateMaj $dateMaj;
  160.         return $this;
  161.     }
  162.     public function getDateMaj(): ?DateTime
  163.     {
  164.         return $this->dateMaj;
  165.     }
  166.     public function setDateSuppression(?DateTime $dateSuppression): Caisse
  167.     {
  168.         $this->dateSuppression $dateSuppression;
  169.         return $this;
  170.     }
  171.     public function getDateSuppression(): ?DateTime
  172.     {
  173.         return $this->dateSuppression;
  174.     }
  175.     public function setUtilisateur(?Utilisateur $utilisateur): Caisse
  176.     {
  177.         $this->utilisateur $utilisateur;
  178.         return $this;
  179.     }
  180.     public function getUtilisateur(): ?Utilisateur
  181.     {
  182.         return $this->utilisateur;
  183.     }
  184.     public function setHauteur(?float $hauteur): Caisse
  185.     {
  186.         $this->hauteur $hauteur;
  187.         return $this;
  188.     }
  189.     public function getHauteur(): ?float
  190.     {
  191.         return $this->hauteur;
  192.     }
  193.     public function setLargeur(?float $largeur): Caisse
  194.     {
  195.         $this->largeur $largeur;
  196.         return $this;
  197.     }
  198.     public function getLargeur(): ?float
  199.     {
  200.         return $this->largeur;
  201.     }
  202.     public function setLongueur(?float $longueur): Caisse
  203.     {
  204.         $this->longueur $longueur;
  205.         return $this;
  206.     }
  207.     public function getLongueur(): ?float
  208.     {
  209.         return $this->longueur;
  210.     }
  211.     public function setNbEtageres(?int $nbEtageres): Caisse
  212.     {
  213.         $this->nbEtageres $nbEtageres;
  214.         return $this;
  215.     }
  216.     public function getNbEtageres(): ?int
  217.     {
  218.         return $this->nbEtageres;
  219.     }
  220.     public function setPourcentageOccupation(?int $pourcentageOccupation): Caisse
  221.     {
  222.         $this->pourcentageOccupation $pourcentageOccupation;
  223.         return $this;
  224.     }
  225.     public function getPourcentageOccupation(): ?int
  226.     {
  227.         return $this->pourcentageOccupation;
  228.     }
  229.     public function __toString() {
  230.         return $this->libelle;
  231.     }
  232.     public function getCouleur(): ?string
  233.     {
  234.         return $this->couleur;
  235.     }
  236.     public function setCouleur(?string $couleur): self
  237.     {
  238.         $this->couleur $couleur;
  239.         return $this;
  240.     }
  241.     public function getStatutCaisse(): ?int
  242.     {
  243.         return $this->statutCaisse;
  244.     }
  245.     public function setStatutCaisse(int $statutCaisse): self
  246.     {
  247.         $this->statutCaisse $statutCaisse;
  248.         return $this;
  249.     }
  250.     public function getClient(): ?Client
  251.     {
  252.         return $this->client;
  253.     }
  254.     public function setClient(?Client $client): self
  255.     {
  256.         $this->client $client;
  257.         return $this;
  258.     }
  259.     public function getCouleurTexte(): ?string
  260.     {
  261.         return $this->couleurTexte;
  262.     }
  263.     public function setCouleurTexte(?string $couleurTexte): self
  264.     {
  265.         $this->couleurTexte $couleurTexte;
  266.         return $this;
  267.     }
  268.     public function getRaisonAnomalie(): ?RaisonAnomalie
  269.     {
  270.         return $this->raisonAnomalie;
  271.     }
  272.     public function setRaisonAnomalie(?RaisonAnomalie $raisonAnomalie): self
  273.     {
  274.         $this->raisonAnomalie $raisonAnomalie;
  275.         return $this;
  276.     }
  277.     public function getCommentaireAnomalie(): ?string
  278.     {
  279.         return $this->commentaireAnomalie;
  280.     }
  281.     public function setCommentaireAnomalie(?string $commentaireAnomalie): self
  282.     {
  283.         $this->commentaireAnomalie $commentaireAnomalie;
  284.         return $this;
  285.     }
  286.     public function getCommande(): ?Commande
  287.     {
  288.         return $this->commande;
  289.     }
  290.     public function setCommande(?Commande $commande): self
  291.     {
  292.         $this->commande $commande;
  293.         return $this;
  294.     }
  295.     public function getType(): ?int
  296.     {
  297.         return $this->type;
  298.     }
  299.     public function setType(?int $type): self
  300.     {
  301.         $this->type $type;
  302.         return $this;
  303.     }
  304.     public function getFinition(): ?Finition
  305.     {
  306.         return $this->finition;
  307.     }
  308.     public function setFinition(?Finition $finition): self
  309.     {
  310.         $this->finition $finition;
  311.         return $this;
  312.     }
  313.     public function getTransporteur(): ?Transporteur
  314.     {
  315.         return $this->transporteur;
  316.     }
  317.     public function setTransporteur(?Transporteur $transporteur): self
  318.     {
  319.         $this->transporteur $transporteur;
  320.         return $this;
  321.     }
  322.     public function getMd5AdresseLivraison(): ?string
  323.     {
  324.         return $this->md5AdresseLivraison;
  325.     }
  326.     public function setMd5AdresseLivraison(?string $md5AdresseLivraison): self
  327.     {
  328.         $this->md5AdresseLivraison $md5AdresseLivraison;
  329.         return $this;
  330.     }
  331. }