<?php
namespace App\Entity;
use App\Repository\LicenseCompanyRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LicenseCompanyRepository::class)
*/
class LicenseCompany
{
const NEW = '0';
const READY = '1';
const ACTIVE = '2';
const EXPIRED = '3';
const RENEWED = '4';
const CANCELED = '5';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=License::class, inversedBy="licenseCompanies")
* @ORM\JoinColumn(onDelete="CASCADE")
* @ORM\JoinColumn(nullable=false)
*/
private $license;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="licenseCompanies")
* @ORM\JoinColumn(onDelete="CASCADE")
* @ORM\JoinColumn(nullable=false)
*/
private $company;
/**
* @ORM\Column(type="datetime")
*/
private $date_added;
/**
* @ORM\Column(type="datetime")
*/
private $date_start;
/**
* @ORM\Column(type="datetime")
*/
private $date_end;
/**
* 1: Preparado, 2: Activo, 3: Vencido, 4: Renovado, 5: Baja
*
* @ORM\Column(type="smallint")
*/
private $state;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $date_updated;
/**
* 1: Mensual, 2: Anual
*
* @ORM\Column(type="smallint")
*/
private $renewal;
/**
* 0: Automatic renewal, 1: Manual renewal
*
* @ORM\Column(type="smallint")
*/
private $renewal_type;
public function getId(): ?int
{
return $this->id;
}
public function getLicense(): ?License
{
return $this->license;
}
public function setLicense(?License $license): self
{
$this->license = $license;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getDateAdded(): ?\DateTimeInterface
{
return $this->date_added;
}
public function setDateAdded(\DateTimeInterface $date_added): self
{
$this->date_added = $date_added;
return $this;
}
public function getDateStart(): ?\DateTimeInterface
{
return $this->date_start;
}
public function setDateStart(\DateTimeInterface $date_start): self
{
$this->date_start = $date_start;
return $this;
}
public function getDateEnd(): ?\DateTimeInterface
{
return $this->date_end;
}
public function setDateEnd(\DateTimeInterface $date_end): self
{
$this->date_end = $date_end;
return $this;
}
public function getState(): ?int
{
return $this->state;
}
public function setState(int $state): self
{
$this->state = $state;
return $this;
}
public function getDateUpdated(): ?\DateTimeInterface
{
return $this->date_updated;
}
public function setDateUpdated(?\DateTimeInterface $date_updated): self
{
$this->date_updated = $date_updated;
return $this;
}
public function getRenewal(): ?int
{
return $this->renewal;
}
public function setRenewal(int $renewal): self
{
$this->renewal = $renewal;
return $this;
}
/**
* @return mixed
*/
public function getRenewalType()
{
return $this->renewal_type;
}
/**
* @param mixed $renewal_type
*/
public function setRenewalType($renewal_type): void
{
$this->renewal_type = $renewal_type;
}
}