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.     // ManyToOne
  76.         /**
  77.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Product", inversedBy="transferLogs")
  78.          * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  79.          */
  80.         private $product;
  81.         
  82.         /**
  83.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\ProductTransfer", inversedBy="logs")
  84.          * @ORM\JoinColumn(name="transfer_id", referencedColumnName="id")
  85.          */
  86.         private $transfer;
  87.         /**
  88.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="transferLogs")
  89.          * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  90.          */
  91.         private $user;
  92.     //
  93.     public function getId(): ?string
  94.     {
  95.         return $this->id;
  96.     }
  97.     public function getProductName(): ?string
  98.     {
  99.         return $this->productName;
  100.     }
  101.     public function setProductName(string $productName): self
  102.     {
  103.         $this->productName $productName;
  104.         return $this;
  105.     }
  106.     public function getCodeSupplier(): ?string
  107.     {
  108.         return $this->codeSupplier;
  109.     }
  110.     public function setCodeSupplier(?string $codeSupplier): self
  111.     {
  112.         $this->codeSupplier $codeSupplier;
  113.         return $this;
  114.     }
  115.     public function getCodeProducer(): ?string
  116.     {
  117.         return $this->codeProducer;
  118.     }
  119.     public function setCodeProducer(?string $codeProducer): self
  120.     {
  121.         $this->codeProducer $codeProducer;
  122.         return $this;
  123.     }
  124.     public function getWarehouseFrom(): ?string
  125.     {
  126.         return $this->warehouseFrom;
  127.     }
  128.     public function setWarehouseFrom(string $warehouseFrom): self
  129.     {
  130.         $this->warehouseFrom $warehouseFrom;
  131.         return $this;
  132.     }
  133.     public function getWarehouseTo(): ?string
  134.     {
  135.         return $this->warehouseTo;
  136.     }
  137.     public function setWarehouseTo(string $warehouseTo): self
  138.     {
  139.         $this->warehouseTo $warehouseTo;
  140.         return $this;
  141.     }
  142.     public function getUserName(): ?string
  143.     {
  144.         return $this->userName;
  145.     }
  146.     public function setUserName(string $userName): self
  147.     {
  148.         $this->userName $userName;
  149.         return $this;
  150.     }
  151.     public function getDownloadType(): ?string
  152.     {
  153.         return $this->downloadType;
  154.     }
  155.     public function setDownloadType(?string $downloadType): self
  156.     {
  157.         $this->downloadType $downloadType;
  158.         return $this;
  159.     }
  160.     public function getDatetime(): ?\DateTimeInterface
  161.     {
  162.         return $this->datetime;
  163.     }
  164.     public function setDatetime(\DateTimeInterface $datetime): self
  165.     {
  166.         $this->datetime $datetime;
  167.         return $this;
  168.     }
  169.     public function getDdt(): ?string
  170.     {
  171.         return $this->ddt;
  172.     }
  173.     public function setDdt(?string $ddt): self
  174.     {
  175.         $this->ddt $ddt;
  176.         return $this;
  177.     }
  178.     public function getDdtPath(): ?string
  179.     {
  180.         return $this->ddtPath;
  181.     }
  182.     public function setDdtPath(?string $ddtPath): self
  183.     {
  184.         $this->ddtPath $ddtPath;
  185.         return $this;
  186.     }
  187.     public function getProduct(): ?Product
  188.     {
  189.         return $this->product;
  190.     }
  191.     public function setProduct(?Product $product): self
  192.     {
  193.         $this->product $product;
  194.         return $this;
  195.     }
  196.     public function getTransfer(): ?ProductTransfer
  197.     {
  198.         return $this->transfer;
  199.     }
  200.     public function setTransfer(?ProductTransfer $transfer): self
  201.     {
  202.         $this->transfer $transfer;
  203.         return $this;
  204.     }
  205.     public function getUser(): ?User
  206.     {
  207.         return $this->user;
  208.     }
  209.     public function setUser(?User $user): self
  210.     {
  211.         $this->user $user;
  212.         return $this;
  213.     }
  214. }