<?php
namespace App\Entity\Master;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="eposm_m_join_table_license_feature")
* @ORM\Entity(repositoryClass="App\Repository\Master\JoinTableLicenseFeatureRepository")
*/
class JoinTableLicenseFeature
{
function getDisplaySelect(){
return $this->feature->getDisplayGroupCategoryAndName().' --- Dal '.$from.$this->activationDate->format('d-m-Y')." al ".$this->expirationDate->format('d-m-Y');
}
/**
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="activation_date", type="date", nullable=true)
*/
protected $activationDate;
/**
* @ORM\Column(name="expiration_date", type="date", nullable=true)
*/
protected $expirationDate;
/**
* @ORM\Column(name="active", type="boolean")
*/
protected $active = true;
// ManyToOne
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Master\License", inversedBy="features")
* @ORM\JoinColumn(name="license_id", referencedColumnName="id")
*/
private $license;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Master\Feature", inversedBy="licenses")
* @ORM\JoinColumn(name="feature_id", referencedColumnName="id")
*/
private $feature;
//
public function getId(): ?string
{
return $this->id;
}
public function getActivationDate(): ?\DateTimeInterface
{
return $this->activationDate;
}
public function setActivationDate(?\DateTimeInterface $activationDate): self
{
$this->activationDate = $activationDate;
return $this;
}
public function getExpirationDate(): ?\DateTimeInterface
{
return $this->expirationDate;
}
public function setExpirationDate(?\DateTimeInterface $expirationDate): self
{
$this->expirationDate = $expirationDate;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getLicense(): ?License
{
return $this->license;
}
public function setLicense(?License $license): self
{
$this->license = $license;
return $this;
}
public function getFeature(): ?Feature
{
return $this->feature;
}
public function setFeature(?Feature $feature): self
{
$this->feature = $feature;
return $this;
}
}