src/Entity/Master/JoinTableLicenseFeature.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Master;
  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_m_join_table_license_feature")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Master\JoinTableLicenseFeatureRepository")
  10.  */
  11. class JoinTableLicenseFeature
  12. {
  13.     function getDisplaySelect(){
  14.         return $this->feature->getDisplayGroupCategoryAndName().' --- Dal '.$from.$this->activationDate->format('d-m-Y')." al ".$this->expirationDate->format('d-m-Y');
  15.     }
  16.     /**
  17.      * @ORM\Column(name="id", type="bigint")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     protected $id;
  22.     /**
  23.      * @ORM\Column(name="activation_date", type="date", nullable=true)
  24.      */
  25.     protected $activationDate;
  26.     /**
  27.      * @ORM\Column(name="expiration_date", type="date", nullable=true)
  28.      */
  29.     protected $expirationDate;
  30.     /**
  31.      * @ORM\Column(name="active", type="boolean")
  32.      */
  33.     protected $active true;
  34.     
  35.     // ManyToOne
  36.         /**
  37.          * @ORM\ManyToOne(targetEntity="App\Entity\Master\License", inversedBy="features")
  38.          * @ORM\JoinColumn(name="license_id", referencedColumnName="id")
  39.          */
  40.         private $license;
  41.         /**
  42.          * @ORM\ManyToOne(targetEntity="App\Entity\Master\Feature", inversedBy="licenses")
  43.          * @ORM\JoinColumn(name="feature_id", referencedColumnName="id")
  44.          */
  45.         private $feature;
  46.     //
  47.     public function getId(): ?string
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getActivationDate(): ?\DateTimeInterface
  52.     {
  53.         return $this->activationDate;
  54.     }
  55.     public function setActivationDate(?\DateTimeInterface $activationDate): self
  56.     {
  57.         $this->activationDate $activationDate;
  58.         return $this;
  59.     }
  60.     public function getExpirationDate(): ?\DateTimeInterface
  61.     {
  62.         return $this->expirationDate;
  63.     }
  64.     public function setExpirationDate(?\DateTimeInterface $expirationDate): self
  65.     {
  66.         $this->expirationDate $expirationDate;
  67.         return $this;
  68.     }
  69.     public function isActive(): ?bool
  70.     {
  71.         return $this->active;
  72.     }
  73.     public function setActive(bool $active): self
  74.     {
  75.         $this->active $active;
  76.         return $this;
  77.     }
  78.     public function getLicense(): ?License
  79.     {
  80.         return $this->license;
  81.     }
  82.     public function setLicense(?License $license): self
  83.     {
  84.         $this->license $license;
  85.         return $this;
  86.     }
  87.     public function getFeature(): ?Feature
  88.     {
  89.         return $this->feature;
  90.     }
  91.     public function setFeature(?Feature $feature): self
  92.     {
  93.         $this->feature $feature;
  94.         return $this;
  95.     }
  96. }