<?php
namespace App\Entity;
use App\Repository\LicenseRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=LicenseRepository::class)
*/
class License
{
const PROVEEDOR = '1';
const PROVEEDOR_PLUS = '2';
const STANDARD = '3';
const PREMIUM = '4';
const TEST = '5';
const ENTERPOISE = '6';
const AUTOMATIC_RENEWAL = '0';
const MANUAL_RENEWAL = '1';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank
*/
private $name;
/**
* 1:Proveedor
* 2:Proveedor plus
* 3:Standard
* 4:Premium
* 5:Test
* 6:Enterprise
*
* @ORM\Column(type="smallint")
*/
private $type;
/**
* @ORM\Column(type="integer")
*/
private $user_admin;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $user_user;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $user_chief;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $user_supplier;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $part_num;
/**
* @ORM\Column(type="boolean")
*/
private $part_version;
/**
* @ORM\Column(type="boolean")
*/
private $part_locked;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $part_library;
/**
* @ORM\Column(type="boolean")
*/
private $wo_internal;
/**
* 1:Recibir, 2:Enviar, 3:Recibir/enviar
*
* @ORM\Column(type="smallint")
* @Assert\NotBlank
*/
private $wo_external;
/**
* @ORM\Column(type="boolean")
*/
private $marketplace;
/**
* @ORM\Column(type="boolean")
*/
private $wo_custom;
/**
* 0:No, 1:Simple, 2:Personalizable
*
* @ORM\Column(type="smallint")
* @Assert\NotBlank
*/
private $dashboard;
/**
* @ORM\Column(type="boolean")
*/
private $multi_select;
/**
* @ORM\Column(type="boolean")
*/
private $graphic_custom;
/**
* 1:Cloud, 2:Cloud/On-Premise
*
* @ORM\Column(type="smallint")
* @Assert\NotBlank
*/
private $hosting;
/**
* @ORM\Column(type="boolean")
*/
private $part_comparison;
/**
* @ORM\OneToMany(targetEntity=LicenseCompany::class, mappedBy="license")
*/
private $licenseCompanies;
/**
* 1:Simple, 2:Árbol
*
* @ORM\Column(type="smallint")
* @Assert\NotBlank
*/
private $part_library_type;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_cad;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_stl;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_fab;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_ver;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_2d;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_others;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_budget;
/**
* @ORM\Column(type="integer")
*/
private $maxsize_report;
/**
* @ORM\Column(type="boolean")
*/
private $search_supplier_cif;
/**
* @ORM\Column(type="boolean")
*/
private $search_supplier_marketplace;
/**
* @ORM\Column(type="boolean")
*/
private $massive_upload;
/**
* @ORM\Column(type="boolean")
*/
private $advanced_filter_search;
/**
* @ORM\Column(type="boolean")
*/
private $configurable_listings;
/**
* @ORM\Column(type="boolean")
*/
private $grid_display;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $user_client;
/**
* @ORM\Column(type="integer")
* @Assert\NotBlank
*/
private $user_supplier_chief;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $qr_reader;
public function __construct()
{
$this->licenseCompanies = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(int $type): self
{
$this->type = $type;
return $this;
}
public function getUserAdmin(): ?int
{
return $this->user_admin;
}
public function setUserAdmin(int $user_admin): self
{
$this->user_admin = $user_admin;
return $this;
}
public function getUserUser(): ?int
{
return $this->user_user;
}
public function setUserUser(int $user_user): self
{
$this->user_user = $user_user;
return $this;
}
public function getUserChief(): ?int
{
return $this->user_chief;
}
public function setUserChief(int $user_chief): self
{
$this->user_chief = $user_chief;
return $this;
}
public function getUserSupplier(): ?int
{
return $this->user_supplier;
}
public function setUserSupplier(int $user_supplier): self
{
$this->user_supplier = $user_supplier;
return $this;
}
public function getPartNum(): ?int
{
return $this->part_num;
}
public function setPartNum(int $part_num): self
{
$this->part_num = $part_num;
return $this;
}
public function getPartVersion(): ?bool
{
return $this->part_version;
}
public function setPartVersion(bool $part_version): self
{
$this->part_version = $part_version;
return $this;
}
public function getPartLocked(): ?bool
{
return $this->part_locked;
}
public function setPartLocked(bool $part_locked): self
{
$this->part_locked = $part_locked;
return $this;
}
public function getPartLibrary(): ?int
{
return $this->part_library;
}
public function setPartLibrary(int $part_library): self
{
$this->part_library = $part_library;
return $this;
}
public function getWoInternal(): ?bool
{
return $this->wo_internal;
}
public function setWoInternal(bool $wo_internal): self
{
$this->wo_internal = $wo_internal;
return $this;
}
public function getWoExternal(): ?int
{
return $this->wo_external;
}
public function setWoExternal(int $wo_external): self
{
$this->wo_external = $wo_external;
return $this;
}
public function getMarketplace(): ?bool
{
return $this->marketplace;
}
public function setMarketplace(bool $marketplace): self
{
$this->marketplace = $marketplace;
return $this;
}
public function getWoCustom(): ?bool
{
return $this->wo_custom;
}
public function setWoCustom(bool $wo_custom): self
{
$this->wo_custom = $wo_custom;
return $this;
}
public function getDashboard(): ?int
{
return $this->dashboard;
}
public function setDashboard(int $dashboard): self
{
$this->dashboard = $dashboard;
return $this;
}
public function getMultiSelect(): ?bool
{
return $this->multi_select;
}
public function setMultiSelect(bool $multi_select): self
{
$this->multi_select = $multi_select;
return $this;
}
public function getGraphicCustom(): ?bool
{
return $this->graphic_custom;
}
public function setGraphicCustom(bool $graphic_custom): self
{
$this->graphic_custom = $graphic_custom;
return $this;
}
public function getHosting(): ?int
{
return $this->hosting;
}
public function setHosting(int $hosting): self
{
$this->hosting = $hosting;
return $this;
}
public function getPartComparison(): ?bool
{
return $this->part_comparison;
}
public function setPartComparison(bool $part_comparison): self
{
$this->part_comparison = $part_comparison;
return $this;
}
/**
* @return Collection<int, LicenseCompany>
*/
public function getLicenseCompanies(): Collection
{
return $this->licenseCompanies;
}
public function addLicenseCompany(LicenseCompany $licenseCompany): self
{
if (!$this->licenseCompanies->contains($licenseCompany)) {
$this->licenseCompanies[] = $licenseCompany;
$licenseCompany->setLicense($this);
}
return $this;
}
public function removeLicenseCompany(LicenseCompany $licenseCompany): self
{
if ($this->licenseCompanies->removeElement($licenseCompany)) {
// set the owning side to null (unless already changed)
if ($licenseCompany->getLicense() === $this) {
$licenseCompany->setLicense(null);
}
}
return $this;
}
public function getPartLibraryType(): ?int
{
return $this->part_library_type;
}
public function setPartLibraryType(int $part_library_type): self
{
$this->part_library_type = $part_library_type;
return $this;
}
public function getMaxsizeCad(): ?int
{
return $this->maxsize_cad;
}
public function setMaxsizeCad(int $maxsize_cad): self
{
$this->maxsize_cad = $maxsize_cad;
return $this;
}
public function getMaxsizeStl(): ?int
{
return $this->maxsize_stl;
}
public function setMaxsizeStl(int $maxsize_stl): self
{
$this->maxsize_stl = $maxsize_stl;
return $this;
}
public function getMaxsizeFab(): ?int
{
return $this->maxsize_fab;
}
public function setMaxsizeFab(int $maxsize_fab): self
{
$this->maxsize_fab = $maxsize_fab;
return $this;
}
public function getMaxsizeVer(): ?int
{
return $this->maxsize_ver;
}
public function setMaxsizeVer(int $maxsize_ver): self
{
$this->maxsize_ver = $maxsize_ver;
return $this;
}
public function getMaxsize2d(): ?int
{
return $this->maxsize_2d;
}
public function setMaxsize2d(int $maxsize_2d): self
{
$this->maxsize_2d = $maxsize_2d;
return $this;
}
public function getMaxsizeOthers(): ?int
{
return $this->maxsize_others;
}
public function setMaxsizeOthers(int $maxsize_others): self
{
$this->maxsize_others = $maxsize_others;
return $this;
}
public function getMaxsizeBudget(): ?int
{
return $this->maxsize_budget;
}
public function setMaxsizeBudget(int $maxsize_budget): self
{
$this->maxsize_budget = $maxsize_budget;
return $this;
}
public function getMaxsizeReport(): ?int
{
return $this->maxsize_report;
}
public function setMaxsizeReport(int $maxsize_report): self
{
$this->maxsize_report = $maxsize_report;
return $this;
}
public function getSearchSupplierCif(): ?bool
{
return $this->search_supplier_cif;
}
public function setSearchSupplierCif(bool $search_supplier_cif): self
{
$this->search_supplier_cif = $search_supplier_cif;
return $this;
}
public function getSearchSupplierMarketplace(): ?bool
{
return $this->search_supplier_marketplace;
}
public function setSearchSupplierMarketplace(bool $search_supplier_marketplace): self
{
$this->search_supplier_marketplace = $search_supplier_marketplace;
return $this;
}
public function getMassiveUpload(): ?bool
{
return $this->massive_upload;
}
public function setMassiveUpload(bool $massive_upload): self
{
$this->massive_upload = $massive_upload;
return $this;
}
public function getAdvancedFilterSearch(): ?bool
{
return $this->advanced_filter_search;
}
public function setAdvancedFilterSearch(bool $advanced_filter_search): self
{
$this->advanced_filter_search = $advanced_filter_search;
return $this;
}
public function getConfigurableListings(): ?bool
{
return $this->configurable_listings;
}
public function setConfigurableListings(bool $configurable_listings): self
{
$this->configurable_listings = $configurable_listings;
return $this;
}
public function getGridDisplay(): ?bool
{
return $this->grid_display;
}
public function setGridDisplay(bool $grid_display): self
{
$this->grid_display = $grid_display;
return $this;
}
public function getUserClient(): ?int
{
return $this->user_client;
}
public function setUserClient(int $user_client): self
{
$this->user_client = $user_client;
return $this;
}
public function getUserSupplierChief(): ?int
{
return $this->user_supplier_chief;
}
public function setUserSupplierChief(int $user_supplier_chief): self
{
$this->user_supplier_chief = $user_supplier_chief;
return $this;
}
public function isQrReader(): ?bool
{
return $this->qr_reader;
}
public function setQrReader(?bool $qr_reader): self
{
$this->qr_reader = $qr_reader;
return $this;
}
}