src/Entity/GestionComerciale/FabricationMultiple.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  3. use App\Entity\Utilisateur\Utilisateur;
  4. use DateTime;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use App\Annotations\SecuredEntity;
  12. /**
  13.  * Fabrication
  14.  *
  15.  * @ORM\Table("commerciale__fabrication_multiple")
  16.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\FabricationMultipleRepository")
  17.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  18.  * @SecuredEntity (name="Fabrication Multiple", group="Gestion commerciale")
  19.  */
  20. class FabricationMultiple
  21. {
  22.     /**
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     
  29.     /**
  30.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  31.      */
  32.     private $reference;
  33.     /**
  34.      * @ORM\Column(name="codeBarre", type="string", length=255, nullable=true)
  35.      * @Assert\NotBlank(groups={"LancerUsinage"},message="Le code barre est obligatoire")
  36.      */
  37.     private $codeBarre;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\TailleDisque")
  40.      * @ORM\JoinColumn(nullable=true)
  41.      * @Assert\NotBlank(groups={"LancerUsinage"},message="La taille du disque est obligatoire")
  42.      */
  43.     private $tailleDisque;
  44.     
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="fabricationsMultiple")
  47.      * @ORM\JoinColumn(nullable=true)
  48.      */
  49.     private $utilisateur;
  50.     
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="fabricationsMagasinier")
  53.      * @ORM\JoinColumn(nullable=true)
  54.      */
  55.     private $magasinier;
  56.     
  57.     /**
  58.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  59.     */
  60.     private $commentaire;
  61.     /**
  62.      * @ORM\Column(name="date", type="datetime")
  63.      */
  64.     private $date;
  65.     
  66.     /**
  67.      * @ORM\Column(name="date_fabrication", type="datetime")
  68.      */
  69.     private $dateFabrication;
  70.     
  71.      /**
  72.      * @ORM\Column(name="date_supression", type="datetime", nullable=true)
  73.      */
  74.     private $dateSuppression;
  75.     
  76.      /**
  77.      * @ORM\Column(name="date_maj", type="datetime", nullable=true)
  78.      * @Gedmo\Timestampable(on="update")
  79.      */
  80.     private $dateMaj;
  81.     
  82.      /**
  83.      * @ORM\Column(name="date_maj_prix", type="datetime", nullable=true)
  84.      
  85.      */
  86.     private $dateMajPrix;
  87.     
  88.     /**
  89.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Fabrication", cascade={"persist"}, mappedBy="fabricationMultiple")
  90.     */
  91.     private $fabrications;
  92.     
  93.     /**
  94.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Fabrication", cascade={"persist"}, mappedBy="prestation")
  95.     */
  96.     private $fabricationsPrestation;
  97.     /**
  98.      * @ORM\ManyToOne(targetEntity="App\Entity\GestionComerciale\StatutFabrication", inversedBy="fabricationsMultiple")
  99.      * @ORM\JoinColumn(nullable=true)
  100.      */
  101.     private $statutFabricationMultiple;
  102.     
  103.     /**
  104.      * @ORM\Column(name="prestation", type="boolean", nullable=true)
  105.      */
  106.     private $prestation;
  107.     /**
  108.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\ArticleCommande", mappedBy="fabricationMultiple")
  109.     */
  110.     private $articleCommandes;
  111.     /**
  112.      * @ORM\Column(name="type_fabrication", type="smallint")
  113.      */
  114.     private $typeFabrication Fabrication::DEDUCTIVE;
  115.     /**
  116.      * @ORM\Column(type="string", length=255, nullable=true)
  117.      */
  118.     private $referenceOqcam;
  119.     /**
  120.      * @ORM\Column(type="string", length=255, nullable=true)
  121.      */
  122.     private $nestOqcam;
  123.     public function __construct()
  124.     {
  125.     $this->date = new Datetime();
  126.         $this->dateFabrication          = new Datetime();
  127.         $this->articleCommandes         = new ArrayCollection();
  128.         $this->fabricationsPrestation   = new ArrayCollection();
  129.         $this->fabrications             = new ArrayCollection();
  130.     }
  131.     public function getId(): ?int
  132.     {
  133.         return $this->id;
  134.     }
  135.     public function setReference(?string $reference): FabricationMultiple
  136.     {
  137.         $this->reference $reference;
  138.         return $this;
  139.     }
  140.     public function getReference(): ?string
  141.     {
  142.         return $this->reference;
  143.     }
  144.     public function setCommentaire(?string $commentaire): FabricationMultiple
  145.     {
  146.         $this->commentaire $commentaire;
  147.         return $this;
  148.     }
  149.     public function getCommentaire(): ?string
  150.     {
  151.         return $this->commentaire;
  152.     }
  153.     public function setDate(DateTime $date): FabricationMultiple
  154.     {
  155.         $this->date $date;
  156.         return $this;
  157.     }
  158.     public function getDate(): DateTime
  159.     {
  160.         return $this->date;
  161.     }
  162.     public function setDateFabrication(DateTime $dateFabrication): FabricationMultiple
  163.     {
  164.         $this->dateFabrication $dateFabrication;
  165.         return $this;
  166.     }
  167.     public function getDateFabrication(): DateTime
  168.     {
  169.         return $this->dateFabrication;
  170.     }
  171.     public function setDateSuppression(?DateTime $dateSuppression): FabricationMultiple
  172.     {
  173.         $this->dateSuppression $dateSuppression;
  174.         return $this;
  175.     }
  176.     public function getDateSuppression(): ?DateTime
  177.     {
  178.         return $this->dateSuppression;
  179.     }
  180.     public function setDateMaj(?DateTime $dateMaj): FabricationMultiple
  181.     {
  182.         $this->dateMaj $dateMaj;
  183.         return $this;
  184.     }
  185.     public function getDateMaj(): ?DateTime
  186.     {
  187.         return $this->dateMaj;
  188.     }
  189.     public function setDateMajPrix(?DateTime $dateMajPrix): FabricationMultiple
  190.     {
  191.         $this->dateMajPrix $dateMajPrix;
  192.         return $this;
  193.     }
  194.     public function getDateMajPrix(): ?DateTime
  195.     {
  196.         return $this->dateMajPrix;
  197.     }
  198.     public function setUtilisateur(?Utilisateur $utilisateur): FabricationMultiple
  199.     {
  200.         $this->utilisateur $utilisateur;
  201.         return $this;
  202.     }
  203.     public function getUtilisateur(): ?Utilisateur
  204.     {
  205.         return $this->utilisateur;
  206.     }
  207.     public function setMagasinier(?Utilisateur $magasinier): FabricationMultiple
  208.     {
  209.         $this->magasinier $magasinier;
  210.         return $this;
  211.     }
  212.     public function getMagasinier(): ?Utilisateur
  213.     {
  214.         return $this->magasinier;
  215.     }
  216.     public function addFabrication(Fabrication $fabrication): FabricationMultiple
  217.     {
  218.         $this->fabrications[] = $fabrication;
  219.         $fabrication->setFabricationMultiple($this);
  220.         return $this;
  221.     }
  222.     public function removeFabrication(Fabrication $fabrication)
  223.     {
  224.         $this->fabrications->removeElement($fabrication);
  225.     }
  226.     public function getFabrications(): Collection
  227.     {
  228.         return $this->fabrications;
  229.     }
  230.     public function setPrestation(?bool $prestation): FabricationMultiple
  231.     {
  232.         $this->prestation $prestation;
  233.         return $this;
  234.     }
  235.     public function getPrestation(): ?bool
  236.     {
  237.         return $this->prestation;
  238.     }
  239.     public function addFabricationsPrestation(Fabrication $fabricationsPrestation): FabricationMultiple
  240.     {
  241.         $this->fabricationsPrestation[] = $fabricationsPrestation;
  242.         $fabricationsPrestation->setPrestation($this);
  243.         return $this;
  244.     }
  245.     public function removeFabricationsPrestation(Fabrication $fabricationsPrestation)
  246.     {
  247.         $this->fabricationsPrestation->removeElement($fabricationsPrestation);
  248.     }
  249.     public function getFabricationsPrestation(): Collection
  250.     {
  251.         return $this->fabricationsPrestation;
  252.     }
  253.     public function addArticleCommande(ArticleCommande $articleCommande): FabricationMultiple
  254.     {
  255.         $this->articleCommandes[] = $articleCommande;
  256.         return $this;
  257.     }
  258.     public function removeArticleCommande(ArticleCommande $articleCommande)
  259.     {
  260.         $this->articleCommandes->removeElement($articleCommande);
  261.     }
  262.     public function getArticleCommandes(): Collection
  263.     {
  264.         return $this->articleCommandes;
  265.     }
  266.     public function setStatutFabricationMultiple(?StatutFabrication $statutFabricationMultiple): FabricationMultiple
  267.     {
  268.         $this->statutFabricationMultiple $statutFabricationMultiple;
  269.         return $this;
  270.     }
  271.     public function getStatutFabricationMultiple(): ?StatutFabrication
  272.     {
  273.         return $this->statutFabricationMultiple;
  274.     }
  275.     public function getTypeFabrication() :int
  276.     {
  277.         return $this->typeFabrication;
  278.     }
  279.     public function setTypeFabricationint $typeFabrication)
  280.     {
  281.         $this->typeFabrication $typeFabrication;
  282.         return $this;
  283.     }
  284.     public function getCodeBarre(): ?string
  285.     {
  286.         return $this->codeBarre;
  287.     }
  288.     public function setCodeBarre(?string $codeBarre): self
  289.     {
  290.         $this->codeBarre $codeBarre;
  291.         return $this;
  292.     }
  293.     public function isPrestation(): ?bool
  294.     {
  295.         return $this->prestation;
  296.     }
  297.     public function getTailleDisque(): ?TailleDisque
  298.     {
  299.         return $this->tailleDisque;
  300.     }
  301.     public function setTailleDisque(?TailleDisque $tailleDisque): self
  302.     {
  303.         $this->tailleDisque $tailleDisque;
  304.         return $this;
  305.     }
  306.     public function getReferenceOqcam(): ?string
  307.     {
  308.         return $this->referenceOqcam;
  309.     }
  310.     public function setReferenceOqcam(?string $referenceOqcam): self
  311.     {
  312.         $this->referenceOqcam $referenceOqcam;
  313.         return $this;
  314.     }
  315.     public function getNestOqcam(): ?string
  316.     {
  317.         return $this->nestOqcam;
  318.     }
  319.     public function setNestOqcam(?string $nestOqcam): self
  320.     {
  321.         $this->nestOqcam $nestOqcam;
  322.         return $this;
  323.     }
  324. }