src/Entity/License.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LicenseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass=LicenseRepository::class)
  10.  */
  11. class License
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=100)
  21.      * @Assert\NotBlank
  22.      */
  23.     private $name;
  24.     /**
  25.      * 1:Proveedor
  26.      * 2:Proveedor plus
  27.      * 3:Standard
  28.      * 4:Premium
  29.      * 5:Test
  30.      * 6:Enterprise
  31.      * 
  32.      * @ORM\Column(type="smallint")
  33.      */
  34.     private $type;
  35.     /**
  36.      * @ORM\Column(type="integer")
  37.      */
  38.     private $user_admin;
  39.     /**
  40.      * @ORM\Column(type="integer")
  41.      * @Assert\NotBlank
  42.      */
  43.     private $user_user;
  44.     /**
  45.      * @ORM\Column(type="integer")
  46.      * @Assert\NotBlank
  47.      */
  48.     private $user_chief;
  49.     /**
  50.      * @ORM\Column(type="integer")
  51.      * @Assert\NotBlank
  52.      */
  53.     private $user_supplier;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      * @Assert\NotBlank
  57.      */
  58.     private $part_num;
  59.     /**
  60.      * @ORM\Column(type="boolean")
  61.      */
  62.     private $part_version;
  63.     /**
  64.      * @ORM\Column(type="boolean")
  65.      */
  66.     private $part_locked;
  67.     /**
  68.      * @ORM\Column(type="integer")
  69.      * @Assert\NotBlank
  70.      */
  71.     private $part_library;
  72.     /**
  73.      * @ORM\Column(type="boolean")
  74.      */
  75.     private $wo_internal;
  76.     /**
  77.      * 1:Recibir, 2:Enviar, 3:Recibir/enviar
  78.      * 
  79.      * @ORM\Column(type="smallint")
  80.      * @Assert\NotBlank
  81.      */
  82.     private $wo_external;
  83.     /**
  84.      * @ORM\Column(type="boolean")
  85.      */
  86.     private $marketplace;
  87.     /**
  88.      * @ORM\Column(type="boolean")
  89.      */
  90.     private $wo_custom;
  91.     /**
  92.      * 0:No, 1:Simple, 2:Personalizable
  93.      * 
  94.      * @ORM\Column(type="smallint")
  95.      * @Assert\NotBlank
  96.      */
  97.     private $dashboard;
  98.     /**
  99.      * @ORM\Column(type="boolean")
  100.      */
  101.     private $multi_select;
  102.     /**
  103.      * @ORM\Column(type="boolean")
  104.      */
  105.     private $graphic_custom;
  106.     /**
  107.      * 1:Cloud, 2:Cloud/On-Premise
  108.      * 
  109.      * @ORM\Column(type="smallint")
  110.      * @Assert\NotBlank
  111.      */
  112.     private $hosting;
  113.     /**
  114.      * @ORM\Column(type="boolean")
  115.      */
  116.     private $part_comparison;
  117.     /**
  118.      * @ORM\OneToMany(targetEntity=LicenseCompany::class, mappedBy="license")
  119.      */
  120.     private $licenseCompanies;
  121.     /**
  122.      * 1:Simple, 2:Árbol
  123.      * 
  124.      * @ORM\Column(type="smallint")
  125.      * @Assert\NotBlank
  126.      */
  127.     private $part_library_type;
  128.     /**
  129.      * @ORM\Column(type="integer")
  130.      */
  131.     private $maxsize_cad;
  132.     /**
  133.      * @ORM\Column(type="integer")
  134.      */
  135.     private $maxsize_stl;
  136.     /**
  137.      * @ORM\Column(type="integer")
  138.      */
  139.     private $maxsize_fab;
  140.     /**
  141.      * @ORM\Column(type="integer")
  142.      */
  143.     private $maxsize_ver;
  144.     /**
  145.      * @ORM\Column(type="integer")
  146.      */
  147.     private $maxsize_2d;
  148.     /**
  149.      * @ORM\Column(type="integer")
  150.      */
  151.     private $maxsize_others;
  152.     /**
  153.      * @ORM\Column(type="integer")
  154.      */
  155.     private $maxsize_budget;
  156.     /**
  157.      * @ORM\Column(type="integer")
  158.      */
  159.     private $maxsize_report;
  160.     /**
  161.      * @ORM\Column(type="boolean")
  162.      */
  163.     private $search_supplier_cif;
  164.     /**
  165.      * @ORM\Column(type="boolean")
  166.      */
  167.     private $search_supplier_marketplace;
  168.     /**
  169.      * @ORM\Column(type="boolean")
  170.      */
  171.     private $massive_upload;
  172.     /**
  173.      * @ORM\Column(type="boolean")
  174.      */
  175.     private $advanced_filter_search;
  176.     /**
  177.      * @ORM\Column(type="boolean")
  178.      */
  179.     private $configurable_listings;
  180.     /**
  181.      * @ORM\Column(type="boolean")
  182.      */
  183.     private $grid_display;
  184.     /**
  185.      * @ORM\Column(type="integer")
  186.      * @Assert\NotBlank
  187.      */
  188.     private $user_client;
  189.     /**
  190.      * @ORM\Column(type="integer")
  191.      * @Assert\NotBlank
  192.      */
  193.     private $user_supplier_chief;
  194.     /**
  195.      * @ORM\Column(type="boolean", nullable=true)
  196.      */
  197.     private $qr_reader;
  198.     public function __construct()
  199.     {
  200.         $this->licenseCompanies = new ArrayCollection();
  201.     }
  202.     public function getId(): ?int
  203.     {
  204.         return $this->id;
  205.     }
  206.     public function getName(): ?string
  207.     {
  208.         return $this->name;
  209.     }
  210.     public function setName(string $name): self
  211.     {
  212.         $this->name $name;
  213.         return $this;
  214.     }
  215.     public function getType(): ?int
  216.     {
  217.         return $this->type;
  218.     }
  219.     public function setType(int $type): self
  220.     {
  221.         $this->type $type;
  222.         return $this;
  223.     }
  224.     public function getUserAdmin(): ?int
  225.     {
  226.         return $this->user_admin;
  227.     }
  228.     public function setUserAdmin(int $user_admin): self
  229.     {
  230.         $this->user_admin $user_admin;
  231.         return $this;
  232.     }
  233.     public function getUserUser(): ?int
  234.     {
  235.         return $this->user_user;
  236.     }
  237.     public function setUserUser(int $user_user): self
  238.     {
  239.         $this->user_user $user_user;
  240.         return $this;
  241.     }
  242.     public function getUserChief(): ?int
  243.     {
  244.         return $this->user_chief;
  245.     }
  246.     public function setUserChief(int $user_chief): self
  247.     {
  248.         $this->user_chief $user_chief;
  249.         return $this;
  250.     }
  251.     public function getUserSupplier(): ?int
  252.     {
  253.         return $this->user_supplier;
  254.     }
  255.     public function setUserSupplier(int $user_supplier): self
  256.     {
  257.         $this->user_supplier $user_supplier;
  258.         return $this;
  259.     }
  260.     public function getPartNum(): ?int
  261.     {
  262.         return $this->part_num;
  263.     }
  264.     public function setPartNum(int $part_num): self
  265.     {
  266.         $this->part_num $part_num;
  267.         return $this;
  268.     }
  269.     public function getPartVersion(): ?bool
  270.     {
  271.         return $this->part_version;
  272.     }
  273.     public function setPartVersion(bool $part_version): self
  274.     {
  275.         $this->part_version $part_version;
  276.         return $this;
  277.     }
  278.     public function getPartLocked(): ?bool
  279.     {
  280.         return $this->part_locked;
  281.     }
  282.     public function setPartLocked(bool $part_locked): self
  283.     {
  284.         $this->part_locked $part_locked;
  285.         return $this;
  286.     }
  287.     public function getPartLibrary(): ?int
  288.     {
  289.         return $this->part_library;
  290.     }
  291.     public function setPartLibrary(int $part_library): self
  292.     {
  293.         $this->part_library $part_library;
  294.         return $this;
  295.     }
  296.     public function getWoInternal(): ?bool
  297.     {
  298.         return $this->wo_internal;
  299.     }
  300.     public function setWoInternal(bool $wo_internal): self
  301.     {
  302.         $this->wo_internal $wo_internal;
  303.         return $this;
  304.     }
  305.     public function getWoExternal(): ?int
  306.     {
  307.         return $this->wo_external;
  308.     }
  309.     public function setWoExternal(int $wo_external): self
  310.     {
  311.         $this->wo_external $wo_external;
  312.         return $this;
  313.     }
  314.     public function getMarketplace(): ?bool
  315.     {
  316.         return $this->marketplace;
  317.     }
  318.     public function setMarketplace(bool $marketplace): self
  319.     {
  320.         $this->marketplace $marketplace;
  321.         return $this;
  322.     }
  323.     public function getWoCustom(): ?bool
  324.     {
  325.         return $this->wo_custom;
  326.     }
  327.     public function setWoCustom(bool $wo_custom): self
  328.     {
  329.         $this->wo_custom $wo_custom;
  330.         return $this;
  331.     }
  332.     public function getDashboard(): ?int
  333.     {
  334.         return $this->dashboard;
  335.     }
  336.     public function setDashboard(int $dashboard): self
  337.     {
  338.         $this->dashboard $dashboard;
  339.         return $this;
  340.     }
  341.     public function getMultiSelect(): ?bool
  342.     {
  343.         return $this->multi_select;
  344.     }
  345.     public function setMultiSelect(bool $multi_select): self
  346.     {
  347.         $this->multi_select $multi_select;
  348.         return $this;
  349.     }
  350.     public function getGraphicCustom(): ?bool
  351.     {
  352.         return $this->graphic_custom;
  353.     }
  354.     public function setGraphicCustom(bool $graphic_custom): self
  355.     {
  356.         $this->graphic_custom $graphic_custom;
  357.         return $this;
  358.     }
  359.     public function getHosting(): ?int
  360.     {
  361.         return $this->hosting;
  362.     }
  363.     public function setHosting(int $hosting): self
  364.     {
  365.         $this->hosting $hosting;
  366.         return $this;
  367.     }
  368.     public function getPartComparison(): ?bool
  369.     {
  370.         return $this->part_comparison;
  371.     }
  372.     public function setPartComparison(bool $part_comparison): self
  373.     {
  374.         $this->part_comparison $part_comparison;
  375.         return $this;
  376.     }
  377.     /**
  378.      * @return Collection<int, LicenseCompany>
  379.      */
  380.     public function getLicenseCompanies(): Collection
  381.     {
  382.         return $this->licenseCompanies;
  383.     }
  384.     public function addLicenseCompany(LicenseCompany $licenseCompany): self
  385.     {
  386.         if (!$this->licenseCompanies->contains($licenseCompany)) {
  387.             $this->licenseCompanies[] = $licenseCompany;
  388.             $licenseCompany->setLicense($this);
  389.         }
  390.         return $this;
  391.     }
  392.     public function removeLicenseCompany(LicenseCompany $licenseCompany): self
  393.     {
  394.         if ($this->licenseCompanies->removeElement($licenseCompany)) {
  395.             // set the owning side to null (unless already changed)
  396.             if ($licenseCompany->getLicense() === $this) {
  397.                 $licenseCompany->setLicense(null);
  398.             }
  399.         }
  400.         return $this;
  401.     }
  402.     public function getPartLibraryType(): ?int
  403.     {
  404.         return $this->part_library_type;
  405.     }
  406.     public function setPartLibraryType(int $part_library_type): self
  407.     {
  408.         $this->part_library_type $part_library_type;
  409.         return $this;
  410.     }
  411.     public function getMaxsizeCad(): ?int
  412.     {
  413.         return $this->maxsize_cad;
  414.     }
  415.     public function setMaxsizeCad(int $maxsize_cad): self
  416.     {
  417.         $this->maxsize_cad $maxsize_cad;
  418.         return $this;
  419.     }
  420.     public function getMaxsizeStl(): ?int
  421.     {
  422.         return $this->maxsize_stl;
  423.     }
  424.     public function setMaxsizeStl(int $maxsize_stl): self
  425.     {
  426.         $this->maxsize_stl $maxsize_stl;
  427.         return $this;
  428.     }
  429.     public function getMaxsizeFab(): ?int
  430.     {
  431.         return $this->maxsize_fab;
  432.     }
  433.     public function setMaxsizeFab(int $maxsize_fab): self
  434.     {
  435.         $this->maxsize_fab $maxsize_fab;
  436.         return $this;
  437.     }
  438.     public function getMaxsizeVer(): ?int
  439.     {
  440.         return $this->maxsize_ver;
  441.     }
  442.     public function setMaxsizeVer(int $maxsize_ver): self
  443.     {
  444.         $this->maxsize_ver $maxsize_ver;
  445.         return $this;
  446.     }
  447.     public function getMaxsize2d(): ?int
  448.     {
  449.         return $this->maxsize_2d;
  450.     }
  451.     public function setMaxsize2d(int $maxsize_2d): self
  452.     {
  453.         $this->maxsize_2d $maxsize_2d;
  454.         return $this;
  455.     }
  456.     public function getMaxsizeOthers(): ?int
  457.     {
  458.         return $this->maxsize_others;
  459.     }
  460.     public function setMaxsizeOthers(int $maxsize_others): self
  461.     {
  462.         $this->maxsize_others $maxsize_others;
  463.         return $this;
  464.     }
  465.     public function getMaxsizeBudget(): ?int
  466.     {
  467.         return $this->maxsize_budget;
  468.     }
  469.     public function setMaxsizeBudget(int $maxsize_budget): self
  470.     {
  471.         $this->maxsize_budget $maxsize_budget;
  472.         return $this;
  473.     }
  474.     public function getMaxsizeReport(): ?int
  475.     {
  476.         return $this->maxsize_report;
  477.     }
  478.     public function setMaxsizeReport(int $maxsize_report): self
  479.     {
  480.         $this->maxsize_report $maxsize_report;
  481.         return $this;
  482.     }
  483.     public function getSearchSupplierCif(): ?bool
  484.     {
  485.         return $this->search_supplier_cif;
  486.     }
  487.     public function setSearchSupplierCif(bool $search_supplier_cif): self
  488.     {
  489.         $this->search_supplier_cif $search_supplier_cif;
  490.         return $this;
  491.     }
  492.     public function getSearchSupplierMarketplace(): ?bool
  493.     {
  494.         return $this->search_supplier_marketplace;
  495.     }
  496.     public function setSearchSupplierMarketplace(bool $search_supplier_marketplace): self
  497.     {
  498.         $this->search_supplier_marketplace $search_supplier_marketplace;
  499.         return $this;
  500.     }
  501.     public function getMassiveUpload(): ?bool
  502.     {
  503.         return $this->massive_upload;
  504.     }
  505.     public function setMassiveUpload(bool $massive_upload): self
  506.     {
  507.         $this->massive_upload $massive_upload;
  508.         return $this;
  509.     }
  510.     public function getAdvancedFilterSearch(): ?bool
  511.     {
  512.         return $this->advanced_filter_search;
  513.     }
  514.     public function setAdvancedFilterSearch(bool $advanced_filter_search): self
  515.     {
  516.         $this->advanced_filter_search $advanced_filter_search;
  517.         return $this;
  518.     }
  519.     public function getConfigurableListings(): ?bool
  520.     {
  521.         return $this->configurable_listings;
  522.     }
  523.     public function setConfigurableListings(bool $configurable_listings): self
  524.     {
  525.         $this->configurable_listings $configurable_listings;
  526.         return $this;
  527.     }
  528.     public function getGridDisplay(): ?bool
  529.     {
  530.         return $this->grid_display;
  531.     }
  532.     public function setGridDisplay(bool $grid_display): self
  533.     {
  534.         $this->grid_display $grid_display;
  535.         return $this;
  536.     }
  537.     public function getUserClient(): ?int
  538.     {
  539.         return $this->user_client;
  540.     }
  541.     public function setUserClient(int $user_client): self
  542.     {
  543.         $this->user_client $user_client;
  544.         return $this;
  545.     }
  546.     public function getUserSupplierChief(): ?int
  547.     {
  548.         return $this->user_supplier_chief;
  549.     }
  550.     public function setUserSupplierChief(int $user_supplier_chief): self
  551.     {
  552.         $this->user_supplier_chief $user_supplier_chief;
  553.         return $this;
  554.     }
  555.     public function isQrReader(): ?bool
  556.     {
  557.         return $this->qr_reader;
  558.     }
  559.     public function setQrReader(?bool $qr_reader): self
  560.     {
  561.         $this->qr_reader $qr_reader;
  562.         return $this;
  563.     }
  564. }