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.         public function getId(): ?string
  47.         {
  48.             return $this->id;
  49.         }
  50.         public function getActivationDate(): ?\DateTimeInterface
  51.         {
  52.             return $this->activationDate;
  53.         }
  54.         public function setActivationDate(?\DateTimeInterface $activationDate): static
  55.         {
  56.             $this->activationDate $activationDate;
  57.             return $this;
  58.         }
  59.         public function getExpirationDate(): ?\DateTimeInterface
  60.         {
  61.             return $this->expirationDate;
  62.         }
  63.         public function setExpirationDate(?\DateTimeInterface $expirationDate): static
  64.         {
  65.             $this->expirationDate $expirationDate;
  66.             return $this;
  67.         }
  68.         public function isActive(): ?bool
  69.         {
  70.             return $this->active;
  71.         }
  72.         public function setActive(bool $active): static
  73.         {
  74.             $this->active $active;
  75.             return $this;
  76.         }
  77.         public function getLicense(): ?License
  78.         {
  79.             return $this->license;
  80.         }
  81.         public function setLicense(?License $license): static
  82.         {
  83.             $this->license $license;
  84.             return $this;
  85.         }
  86.         public function getFeature(): ?Feature
  87.         {
  88.             return $this->feature;
  89.         }
  90.         public function setFeature(?Feature $feature): static
  91.         {
  92.             $this->feature $feature;
  93.             return $this;
  94.         }
  95. }