<?php
namespace App\Entity;
use App\Repository\HtExtraRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=HtExtraRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class HtExtra
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $concept;
/**
* Esto serĂa el precio de coste
* @ORM\Column(type="float", nullable=true)
*/
private $price;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $vat;
/**
* @ORM\Column(type="boolean")
*/
private $appearInvoice;
/**
* @ORM\ManyToOne(targetEntity=HtItem::class, inversedBy="htExtras", cascade={"persist", "remove"})
*/
private $htItem;
/**
* @ORM\ManyToOne(targetEntity=htMenu::class, inversedBy="htExtras", cascade={"persist", "remove"})
*/
private $htMenu;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $updatedAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private $createdId;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private $updatedId;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $hours;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $quantity;
/**
* Este campo es para sumar al precio lo que se va a cobrar por encima al cliente
* @ORM\Column(type="float")
*/
private $overCommission;
/**
* @ORM\Column(type="boolean")
*/
private $opOverCommission;
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): self
{
$this->id = $id;
return $this;
}
public function getConcept(): ?string
{
return $this->concept;
}
public function setConcept(?string $concept): self
{
$this->concept = $concept;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(?float $price): self
{
$this->price = $price;
return $this;
}
public function getVat(): ?float
{
return $this->vat;
}
public function setVat(?float $vat): self
{
$this->vat = $vat;
return $this;
}
public function isAppearInvoice(): ?bool
{
return $this->appearInvoice;
}
public function setAppearInvoice(bool $appearInvoice): self
{
$this->appearInvoice = $appearInvoice;
return $this;
}
public function getHtItem(): ?HtItem
{
return $this->htItem;
}
public function setHtItem(?HtItem $htItem): self
{
$this->htItem = $htItem;
return $this;
}
public function getHtMenu(): ?htMenu
{
return $this->htMenu;
}
public function setHtMenu(?htMenu $htMenu): self
{
$this->htMenu = $htMenu;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->createdAt = new \DateTimeImmutable();
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function setUpdatedAtValue()
{
$this->updatedAt = new \DateTimeImmutable();
}
public function getCreatedId(): ?User
{
return $this->createdId;
}
public function setCreatedId(?User $createdId): self
{
$this->createdId = $createdId;
return $this;
}
public function getUpdatedId(): ?User
{
return $this->updatedId;
}
public function setUpdatedId(?User $updatedId): self
{
$this->updatedId = $updatedId;
return $this;
}
public function getHours(): ?float
{
return $this->hours;
}
public function setHours(?float $hours): self
{
$this->hours = $hours;
return $this;
}
public function getQuantity(): ?float
{
return $this->quantity;
}
public function setQuantity(?float $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getOverCommission(): ?float
{
return $this->overCommission;
}
public function setOverCommission(float $overCommission): self
{
$this->overCommission = $overCommission;
return $this;
}
public function isOpOverCommission(): ?bool
{
return $this->opOverCommission;
}
public function setOpOverCommission(bool $opOverCommission): self
{
$this->opOverCommission = $opOverCommission;
return $this;
}
}