src/Entity/Slave/JoinTableProductProductTransfer.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_join_table_product_product_transfer")
  9.  * @ORM\Entity
  10.  */
  11. class JoinTableProductProductTransfer
  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.     /**
  26.      * @ORM\Column(name="id", type="bigint")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     protected $id;
  31.     
  32.     /**
  33.      * @ORM\Column(name="transfer_ok", type="boolean")
  34.      */
  35.     protected $transferOk false;
  36.     
  37.     /**
  38.      * @ORM\Column(name="download_type", type="string", length=191, nullable=true)
  39.      */
  40.     protected $downloadType;
  41.     // ManyToOne
  42.         /**
  43.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Product", inversedBy="transfers")
  44.          * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  45.          */
  46.         private $product;
  47.         /**
  48.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\ProductTransfer", inversedBy="products")
  49.          * @ORM\JoinColumn(name="transfer_id", referencedColumnName="id")
  50.          */
  51.         private $transfer;
  52.     //
  53.     public function getId(): ?string
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function isTransferOk(): ?bool
  58.     {
  59.         return $this->transferOk;
  60.     }
  61.     public function setTransferOk(bool $transferOk): self
  62.     {
  63.         $this->transferOk $transferOk;
  64.         return $this;
  65.     }
  66.     public function getDownloadType(): ?string
  67.     {
  68.         return $this->downloadType;
  69.     }
  70.     public function setDownloadType(?string $downloadType): self
  71.     {
  72.         $this->downloadType $downloadType;
  73.         return $this;
  74.     }
  75.     public function getProduct(): ?Product
  76.     {
  77.         return $this->product;
  78.     }
  79.     public function setProduct(?Product $product): self
  80.     {
  81.         $this->product $product;
  82.         return $this;
  83.     }
  84.     public function getTransfer(): ?ProductTransfer
  85.     {
  86.         return $this->transfer;
  87.     }
  88.     public function setTransfer(?ProductTransfer $transfer): self
  89.     {
  90.         $this->transfer $transfer;
  91.         return $this;
  92.     }
  93. }