src/Entity/CompanySupplier.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompanySupplierRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CompanySupplierRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class CompanySupplier
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="companySuppliers")
  19.      * @ORM\JoinColumn(onDelete="CASCADE")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $company;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Supplier::class, inversedBy="companySuppliers")
  25.      * @ORM\JoinColumn(onDelete="CASCADE")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $supplier;
  29.     /**
  30.      * @ORM\Column(type="datetime")
  31.      */
  32.     private $date_added;
  33.     /**
  34.      * 1:Interno, 2:Externo
  35.      * 
  36.      * @ORM\Column(type="smallint")
  37.      */
  38.     private $type;
  39.     /**
  40.      * Aprueba la solicitud de colaboraciĆ³n externa
  41.      * Solo requerido para relaciĆ³n tipo=2 y para marketplace
  42.      * 
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $collab;
  46.     /**
  47.      * Fecha en que se aprueba/deniega solicitud c.e.
  48.      * 
  49.      * @ORM\Column(type="datetime", nullable=true)
  50.      */
  51.     private $date_collab;
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity=User::class)
  54.      * @ORM\JoinColumn(onDelete="CASCADE")
  55.      */
  56.     private $user_collab;
  57.     /**
  58.      * @ORM\Column(type="boolean")
  59.      */
  60.     private $config_step_budget;
  61.     /**
  62.      * @ORM\Column(type="boolean")
  63.      */
  64.     private $config_step_chief_confirm;
  65.     /**
  66.      * @ORM\Column(type="boolean")
  67.      */
  68.     private $config_step_in_delivery;
  69.     /**
  70.      * @ORM\Column(type="boolean", nullable=true)
  71.      */
  72.     private $marketplace;
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getCompany(): ?Company
  78.     {
  79.         return $this->company;
  80.     }
  81.     public function setCompany(?Company $company): self
  82.     {
  83.         $this->company $company;
  84.         return $this;
  85.     }
  86.     public function getSupplier(): ?Supplier
  87.     {
  88.         return $this->supplier;
  89.     }
  90.     public function setSupplier(?Supplier $supplier): self
  91.     {
  92.         $this->supplier $supplier;
  93.         return $this;
  94.     }
  95.     public function getDateAdded(): ?\DateTimeInterface
  96.     {
  97.         return $this->date_added;
  98.     }
  99.     public function setDateAdded(\DateTimeInterface $date_added): self
  100.     {
  101.         $this->date_added $date_added;
  102.         return $this;
  103.     }
  104.     public function getType(): ?int
  105.     {
  106.         return $this->type;
  107.     }
  108.     public function setType(int $type): self
  109.     {
  110.         $this->type $type;
  111.         return $this;
  112.     }
  113.     /**
  114.      * @ORM\PrePersist
  115.      */
  116.     public function setDateAddedValue(): void
  117.     {
  118.         $this->date_added = new \DateTime();
  119.     }
  120.     public function getCollab(): ?bool
  121.     {
  122.         return $this->collab;
  123.     }
  124.     public function setCollab(?bool $collab): self
  125.     {
  126.         $this->collab $collab;
  127.         return $this;
  128.     }
  129.     public function getDateCollab(): ?\DateTimeInterface
  130.     {
  131.         return $this->date_collab;
  132.     }
  133.     public function setDateCollab(?\DateTimeInterface $date_collab): self
  134.     {
  135.         $this->date_collab $date_collab;
  136.         return $this;
  137.     }
  138.     public function getUserCollab(): ?User
  139.     {
  140.         return $this->user_collab;
  141.     }
  142.     public function setUserCollab(?User $user_collab): self
  143.     {
  144.         $this->user_collab $user_collab;
  145.         return $this;
  146.     }
  147.     public function getConfigStepBudget(): ?bool
  148.     {
  149.         return $this->config_step_budget;
  150.     }
  151.     public function setConfigStepBudget(bool $config_step_budget): self
  152.     {
  153.         $this->config_step_budget $config_step_budget;
  154.         return $this;
  155.     }
  156.     public function getConfigStepChiefConfirm(): ?bool
  157.     {
  158.         return $this->config_step_chief_confirm;
  159.     }
  160.     public function setConfigStepChiefConfirm(bool $config_step_chief_confirm): self
  161.     {
  162.         $this->config_step_chief_confirm $config_step_chief_confirm;
  163.         return $this;
  164.     }
  165.     public function getConfigStepInDelivery(): ?bool
  166.     {
  167.         return $this->config_step_in_delivery;
  168.     }
  169.     public function setConfigStepInDelivery(bool $config_step_in_delivery): self
  170.     {
  171.         $this->config_step_in_delivery $config_step_in_delivery;
  172.         return $this;
  173.     }
  174.     public function getMarketplace(): ?bool
  175.     {
  176.         return $this->marketplace;
  177.     }
  178.     public function setMarketplace(?bool $marketplace): self
  179.     {
  180.         $this->marketplace $marketplace;
  181.         return $this;
  182.     }
  183. }