src/Entity/LicenseCompany.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LicenseCompanyRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=LicenseCompanyRepository::class)
  7.  */
  8. class LicenseCompany
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=License::class, inversedBy="licenseCompanies")
  18.      * @ORM\JoinColumn(onDelete="CASCADE")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $license;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="licenseCompanies")
  24.      * @ORM\JoinColumn(onDelete="CASCADE")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $company;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $date_added;
  32.     /**
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $date_start;
  36.     /**
  37.      * @ORM\Column(type="datetime")
  38.      */
  39.     private $date_end;
  40.     /**
  41.      * 1: Preparado, 2: Activo, 3: Vencido, 4: Renovado, 5: Baja
  42.      * 
  43.      * @ORM\Column(type="smallint")
  44.      */
  45.     private $state;
  46.     /**
  47.      * @ORM\Column(type="datetime", nullable=true)
  48.      */
  49.     private $date_updated;
  50.     /**
  51.      * 1: Mensual, 2: Anual
  52.      * 
  53.      * @ORM\Column(type="smallint")
  54.      */
  55.     private $renewal;
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getLicense(): ?License
  61.     {
  62.         return $this->license;
  63.     }
  64.     public function setLicense(?License $license): self
  65.     {
  66.         $this->license $license;
  67.         return $this;
  68.     }
  69.     public function getCompany(): ?Company
  70.     {
  71.         return $this->company;
  72.     }
  73.     public function setCompany(?Company $company): self
  74.     {
  75.         $this->company $company;
  76.         return $this;
  77.     }
  78.     public function getDateAdded(): ?\DateTimeInterface
  79.     {
  80.         return $this->date_added;
  81.     }
  82.     public function setDateAdded(\DateTimeInterface $date_added): self
  83.     {
  84.         $this->date_added $date_added;
  85.         return $this;
  86.     }
  87.     public function getDateStart(): ?\DateTimeInterface
  88.     {
  89.         return $this->date_start;
  90.     }
  91.     public function setDateStart(\DateTimeInterface $date_start): self
  92.     {
  93.         $this->date_start $date_start;
  94.         return $this;
  95.     }
  96.     public function getDateEnd(): ?\DateTimeInterface
  97.     {
  98.         return $this->date_end;
  99.     }
  100.     public function setDateEnd(\DateTimeInterface $date_end): self
  101.     {
  102.         $this->date_end $date_end;
  103.         return $this;
  104.     }
  105.     public function getState(): ?int
  106.     {
  107.         return $this->state;
  108.     }
  109.     public function setState(int $state): self
  110.     {
  111.         $this->state $state;
  112.         return $this;
  113.     }
  114.     public function getDateUpdated(): ?\DateTimeInterface
  115.     {
  116.         return $this->date_updated;
  117.     }
  118.     public function setDateUpdated(?\DateTimeInterface $date_updated): self
  119.     {
  120.         $this->date_updated $date_updated;
  121.         return $this;
  122.     }
  123.     public function getRenewal(): ?int
  124.     {
  125.         return $this->renewal;
  126.     }
  127.     public function setRenewal(int $renewal): self
  128.     {
  129.         $this->renewal $renewal;
  130.         return $this;
  131.     }
  132. }