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