<?php
namespace App\Entity;
use App\Repository\EscandalloRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=EscandalloRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class Escandallo
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups("escandallo:read")
*/
private $id;
/**
* @ORM\Column(type="float")
*/
private $totalTenPax;
/**
* @ORM\Column(type="float")
* @Groups("escandallo:read")
*/
private $costePax;
/**
* @ORM\Column(type="float")
* @Groups("escandallo:read")
*/
private $pvp;
/**
* @ORM\Column(type="float")
* @Groups("escandallo:read")
*/
private $pvpNotVat;
/**
* @ORM\Column(type="float")
*/
private $costeDirectoPerc;
/**
* @ORM\Column(type="float")
*/
private $beneficio;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups("escandallo:read")
*/
private $foto;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $decription;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $observaciones;
/**
* @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\OneToMany(targetEntity=EscandalloProduct::class, mappedBy="escandallo", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $escandalloProducts;
/**
* @ORM\OneToMany(targetEntity=EscandalloProduct::class, mappedBy="escandalloChild", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $escandalloChildProducts;
/**
* @ORM\Column(type="string", length=255)
* @Groups("escandallo:read")
*/
private $nombre;
/**
* @ORM\Column(type="integer")
*/
private $escandalloPax;
/**
* @ORM\ManyToMany(targetEntity=HtMenu::class, mappedBy="escandallo")
*/
private $htMenus;
/**
* @ORM\ManyToOne(targetEntity=FamilyEscandallo::class, inversedBy="escandallo")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
*/
private $familyEscandallo;
/**
* @ORM\OneToMany(targetEntity=HtNote::class, mappedBy="htEscandallo", orphanRemoval=true)
*/
private $htNotes;
public function __construct()
{
$this->escandalloProducts = new ArrayCollection();
$this->escandalloChildProducts = new ArrayCollection();
$this->htMenus = new ArrayCollection();
$this->htNotes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTotalTenPax(): ?float
{
return $this->totalTenPax;
}
public function setTotalTenPax(float $totalTenPax): self
{
$this->totalTenPax = $totalTenPax;
return $this;
}
public function getCostePax(): ?float
{
return $this->costePax;
}
public function setCostePax(float $costePax): self
{
$this->costePax = $costePax;
return $this;
}
public function getPvp(): ?float
{
return $this->pvp;
}
public function setPvp(float $pvp): self
{
$this->pvp = $pvp;
return $this;
}
public function getPvpNotVat(): ?float
{
return $this->pvpNotVat;
}
public function setPvpNotVat(float $pvpNotVat): self
{
$this->pvpNotVat = $pvpNotVat;
return $this;
}
public function getCosteDirectoPerc(): ?float
{
return $this->costeDirectoPerc;
}
public function setCosteDirectoPerc(float $costeDirectoPerc): self
{
$this->costeDirectoPerc = $costeDirectoPerc;
return $this;
}
public function getBeneficio(): ?float
{
return $this->beneficio;
}
public function setBeneficio(float $beneficio): self
{
$this->beneficio = $beneficio;
return $this;
}
public function getFoto(): ?string
{
return $this->foto;
}
public function setFoto(?string $foto): self
{
$this->foto = $foto;
return $this;
}
public function getDecription(): ?string
{
return $this->decription;
}
public function setDecription(?string $decription): self
{
$this->decription = $decription;
return $this;
}
public function getObservaciones(): ?string
{
return $this->observaciones;
}
public function setObservaciones(?string $observaciones): self
{
$this->observaciones = $observaciones;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->createdAt = new \DateTimeImmutable();
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function setUpdatedAtValue()
{
$this->updatedAt = new \DateTimeImmutable();
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
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;
}
/**
* @return Collection<int, EscandalloProduct>
*/
public function getEscandalloProducts(): Collection
{
return $this->escandalloProducts;
}
public function addEscandalloProduct(EscandalloProduct $escandalloProduct): self
{
if (!$this->escandalloProducts->contains($escandalloProduct)) {
$this->escandalloProducts[] = $escandalloProduct;
$escandalloProduct->setEscandallo($this);
}
return $this;
}
public function removeEscandalloProduct(EscandalloProduct $escandalloProduct): self
{
if ($this->escandalloProducts->removeElement($escandalloProduct)) {
// set the owning side to null (unless already changed)
if ($escandalloProduct->getEscandallo() === $this) {
$escandalloProduct->setEscandallo(null);
}
}
return $this;
}
/**
* @return Collection<int, EscandalloProduct>
*/
public function getEscandalloChildProducts(): Collection
{
return $this->escandalloChildProducts;
}
public function addEscandalloChildProduct(EscandalloProduct $escandalloChildProduct): self
{
if (!$this->escandalloChildProducts->contains($escandalloChildProduct)) {
$this->escandalloChildProducts[] = $escandalloChildProduct;
$escandalloChildProduct->setEscandalloChild($this);
}
return $this;
}
public function removeEscandalloChildProduct(EscandalloProduct $escandalloChildProduct): self
{
if ($this->escandalloChildProducts->removeElement($escandalloChildProduct)) {
// set the owning side to null (unless already changed)
if ($escandalloChildProduct->getEscandalloChild() === $this) {
$escandalloChildProduct->setEscandalloChild(null);
}
}
return $this;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
public function getEscandalloPax(): ?int
{
return $this->escandalloPax;
}
public function setEscandalloPax(int $escandalloPax): self
{
$this->escandalloPax = $escandalloPax;
return $this;
}
/**
* @return Collection<int, HtMenu>
*/
public function getHtMenus(): Collection
{
return $this->htMenus;
}
public function addHtMenu(HtMenu $htMenu): self
{
if (!$this->htMenus->contains($htMenu)) {
$this->htMenus[] = $htMenu;
$htMenu->addEscandallo($this);
}
return $this;
}
public function removeHtMenu(HtMenu $htMenu): self
{
if ($this->htMenus->removeElement($htMenu)) {
$htMenu->removeEscandallo($this);
}
return $this;
}
public function getFamilyEscandallo(): ?FamilyEscandallo
{
return $this->familyEscandallo;
}
public function setFamilyEscandallo(?FamilyEscandallo $familyEscandallo): self
{
$this->familyEscandallo = $familyEscandallo;
return $this;
}
/**
* @return Collection<int, HtNote>
*/
public function getHtNotes(): Collection
{
return $this->htNotes;
}
public function addHtNote(HtNote $htNote): self
{
if (!$this->htNotes->contains($htNote)) {
$this->htNotes[] = $htNote;
$htNote->setHtEscandallo($this);
}
return $this;
}
public function removeHtNote(HtNote $htNote): self
{
if ($this->htNotes->removeElement($htNote)) {
// set the owning side to null (unless already changed)
if ($htNote->getHtEscandallo() === $this) {
$htNote->setHtEscandallo(null);
}
}
return $this;
}
}