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.         public function getId(): ?string
  53.         {
  54.             return $this->id;
  55.         }
  56.         public function isTransferOk(): ?bool
  57.         {
  58.             return $this->transferOk;
  59.         }
  60.         public function setTransferOk(bool $transferOk): static
  61.         {
  62.             $this->transferOk $transferOk;
  63.             return $this;
  64.         }
  65.         public function getDownloadType(): ?string
  66.         {
  67.             return $this->downloadType;
  68.         }
  69.         public function setDownloadType(?string $downloadType): static
  70.         {
  71.             $this->downloadType $downloadType;
  72.             return $this;
  73.         }
  74.         public function getProduct(): ?Product
  75.         {
  76.             return $this->product;
  77.         }
  78.         public function setProduct(?Product $product): static
  79.         {
  80.             $this->product $product;
  81.             return $this;
  82.         }
  83.         public function getTransfer(): ?ProductTransfer
  84.         {
  85.             return $this->transfer;
  86.         }
  87.         public function setTransfer(?ProductTransfer $transfer): static
  88.         {
  89.             $this->transfer $transfer;
  90.             return $this;
  91.         }
  92. }