src/Entity/Slave/ProductTransferLog.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Slave;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="eposm_s_product_transfer_log")
  9.  * @ORM\Entity
  10.  */
  11. class ProductTransferLog
  12. {        
  13.     function displayDownloadType()
  14.     {
  15.         switch($this->getDownloadType()){
  16.             case 'scan': return 'Tramite scansione'; break;
  17.             case 'button': return 'Tramite bottone'; break;
  18.             case 'manual': return 'Manualmente'; break;
  19.             case 'forced': return 'Forzato'; break;
  20.             case 'forced_password': return 'Forzato con password'; break;
  21.             default: break;
  22.         }
  23.     }
  24.     /**
  25.      * @ORM\Column(name="id", type="bigint")
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     protected $id;
  30.     /**
  31.      * @ORM\Column(name="product_name", type="string", length=191)
  32.      */
  33.     protected $productName;
  34.     
  35.     /**
  36.      * @ORM\Column(name="code_supplier", type="string", length=191, nullable=true)
  37.      */
  38.     protected $codeSupplier;
  39.     
  40.     /**
  41.      * @ORM\Column(name="code_producer", type="string", length=191, nullable=true)
  42.      */
  43.     protected $codeProducer;
  44.     /**
  45.      * @ORM\Column(name="warehouse_from", type="string", length=191)
  46.      */
  47.     protected $warehouseFrom;
  48.     /**
  49.      * @ORM\Column(name="warehouse_to", type="string", length=191)
  50.      */
  51.     protected $warehouseTo;
  52.     /**
  53.      * @ORM\Column(name="user_name", type="string", length=191)
  54.      */
  55.     protected $userName;
  56.     
  57.     /**
  58.      * @ORM\Column(name="download_type", type="string", length=191, nullable=true)
  59.      */
  60.     protected $downloadType;
  61.     /**
  62.      * @ORM\Column(name="datetime", type="datetime")
  63.      */
  64.     protected $datetime;
  65.        
  66.     /**
  67.      * @ORM\Column(name="ddt", type="string", length=191, nullable=true)
  68.      */
  69.     protected $ddt;
  70.     
  71.     /**
  72.      * @ORM\Column(name="ddt_path", type="string", length=191, nullable=true)
  73.      */
  74.     protected $ddtPath;
  75.        
  76.     /**
  77.      * @ORM\Column(name="stock_order", type="string", length=191, nullable=true)
  78.      */
  79.     protected $stockOrder;
  80.     // ManyToOne
  81.         /**
  82.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Product", inversedBy="transferLogs")
  83.          * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  84.          */
  85.         private $product;
  86.         
  87.         /**
  88.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\ProductTransfer", inversedBy="logs")
  89.          * @ORM\JoinColumn(name="transfer_id", referencedColumnName="id")
  90.          */
  91.         private $transfer;
  92.         /**
  93.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="transferLogs")
  94.          * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  95.          */
  96.         private $user;
  97.     //
  98.     
  99.     public function getId(): ?string
  100.     {
  101.         return $this->id;
  102.     }
  103.     public function getProductName(): ?string
  104.     {
  105.         return $this->productName;
  106.     }
  107.     public function setProductName(string $productName): static
  108.     {
  109.         $this->productName $productName;
  110.         return $this;
  111.     }
  112.     public function getCodeSupplier(): ?string
  113.     {
  114.         return $this->codeSupplier;
  115.     }
  116.     public function setCodeSupplier(?string $codeSupplier): static
  117.     {
  118.         $this->codeSupplier $codeSupplier;
  119.         return $this;
  120.     }
  121.     public function getCodeProducer(): ?string
  122.     {
  123.         return $this->codeProducer;
  124.     }
  125.     public function setCodeProducer(?string $codeProducer): static
  126.     {
  127.         $this->codeProducer $codeProducer;
  128.         return $this;
  129.     }
  130.     public function getWarehouseFrom(): ?string
  131.     {
  132.         return $this->warehouseFrom;
  133.     }
  134.     public function setWarehouseFrom(string $warehouseFrom): static
  135.     {
  136.         $this->warehouseFrom $warehouseFrom;
  137.         return $this;
  138.     }
  139.     public function getWarehouseTo(): ?string
  140.     {
  141.         return $this->warehouseTo;
  142.     }
  143.     public function setWarehouseTo(string $warehouseTo): static
  144.     {
  145.         $this->warehouseTo $warehouseTo;
  146.         return $this;
  147.     }
  148.     public function getUserName(): ?string
  149.     {
  150.         return $this->userName;
  151.     }
  152.     public function setUserName(string $userName): static
  153.     {
  154.         $this->userName $userName;
  155.         return $this;
  156.     }
  157.     public function getDownloadType(): ?string
  158.     {
  159.         return $this->downloadType;
  160.     }
  161.     public function setDownloadType(?string $downloadType): static
  162.     {
  163.         $this->downloadType $downloadType;
  164.         return $this;
  165.     }
  166.     public function getDatetime(): ?\DateTimeInterface
  167.     {
  168.         return $this->datetime;
  169.     }
  170.     public function setDatetime(\DateTimeInterface $datetime): static
  171.     {
  172.         $this->datetime $datetime;
  173.         return $this;
  174.     }
  175.     public function getDdt(): ?string
  176.     {
  177.         return $this->ddt;
  178.     }
  179.     public function setDdt(?string $ddt): static
  180.     {
  181.         $this->ddt $ddt;
  182.         return $this;
  183.     }
  184.     public function getDdtPath(): ?string
  185.     {
  186.         return $this->ddtPath;
  187.     }
  188.     public function setDdtPath(?string $ddtPath): static
  189.     {
  190.         $this->ddtPath $ddtPath;
  191.         return $this;
  192.     }
  193.     public function getStockOrder(): ?string
  194.     {
  195.         return $this->stockOrder;
  196.     }
  197.     public function setStockOrder(?string $stockOrder): static
  198.     {
  199.         $this->stockOrder $stockOrder;
  200.         return $this;
  201.     }
  202.     public function getProduct(): ?Product
  203.     {
  204.         return $this->product;
  205.     }
  206.     public function setProduct(?Product $product): static
  207.     {
  208.         $this->product $product;
  209.         return $this;
  210.     }
  211.     public function getTransfer(): ?ProductTransfer
  212.     {
  213.         return $this->transfer;
  214.     }
  215.     public function setTransfer(?ProductTransfer $transfer): static
  216.     {
  217.         $this->transfer $transfer;
  218.         return $this;
  219.     }
  220.     public function getUser(): ?User
  221.     {
  222.         return $this->user;
  223.     }
  224.     public function setUser(?User $user): static
  225.     {
  226.         $this->user $user;
  227.         return $this;
  228.     }
  229. }