src/MDS/AvexpressBundle/Entity/AvePackageTemplate.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\MDS\AvexpressBundle\Entity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\MDS\VenuesBundle\Entity\ReservationLoungeDetails;
  8. /**
  9.  * AvePackageTemplate
  10.  *
  11.  * @ORM\Table(name="ave_package_template")
  12.  * @ORM\Entity(repositoryClass="App\MDS\AvexpressBundle\Repository\AvePackageTemplateRepository")
  13.  */
  14. class AvePackageTemplate
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="name", type="string", length=255)
  28.      */
  29.     private $name;
  30.     /**
  31.      * @ORM\Column(name="product_name_en", type="string", length=255, nullable=true)
  32.      */
  33.     private $productNameEn = null;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="description", type="text", nullable=true)
  38.      */
  39.     private $description;
  40.     /**
  41.      * @ORM\Column(name="description_en", type="text", nullable=true)
  42.      */
  43.     private $descriptionEn = null;
  44.     /**
  45.      * @ORM\Column(name="total_net_price", type="float")
  46.      * Precio Neto del Paquete
  47.      */
  48.     private $totalNetPrice;
  49.     /**
  50.      * @var \DateTime
  51.      *
  52.      * @ORM\Column(name="createdAt", type="datetime")
  53.      */
  54.     private $createdAt;
  55.     /**
  56.      * @var string
  57.      *
  58.      * @ORM\Column(name="createdId", type="string", length=255)
  59.      */
  60.     private $createdId;
  61.     /**
  62.      * @var \DateTime
  63.      *
  64.      * @ORM\Column(name="updatedAt", type="datetime")
  65.      */
  66.     private $updatedAt;
  67.     /**
  68.      * @var string
  69.      *
  70.      * @ORM\Column(name="updatedId", type="string", length=255)
  71.      */
  72.     private $updatedId;
  73.     /**
  74.      * @var int
  75.      *
  76.      * Id en la tabla productFile, si es nulo pertenece a una plantilla
  77.      * @ORM\Column(name="aveProductFileId", type="integer", nullable=true)
  78.      *
  79.      */
  80.     private $aveProductFileId;
  81.     /**
  82.      * @ORM\Column(name="is_featured", type="boolean", options={"default": false})
  83.      */
  84.     private bool $isFeatured = false;
  85.     /**
  86.      * @ORM\Column(name="internal_price", type="float")
  87.      * Precio Neto del Paquete
  88.      */
  89.     private $internalPrice;
  90.     /**
  91.      * @ORM\ManyToMany(targetEntity="App\MDS\VenuesBundle\Entity\ReservationLoungeDetails")
  92.      * @ORM\JoinTable(name="ave_package_lounges",
  93.      * joinColumns={@ORM\JoinColumn(name="package_template_id", referencedColumnName="id")},
  94.      * inverseJoinColumns={@ORM\JoinColumn(name="lounge_id", referencedColumnName="id")}
  95.      * )
  96.      */
  97.     private Collection $lounges;
  98.     /**
  99.      * @var float|null
  100.      * @ORM\Column(name="pricePackage", type="float", nullable=true)
  101.      */
  102.     private $pricePackage;
  103.     /**
  104.      * @ORM\ManyToMany(targetEntity="App\MDS\AvexpressBundle\Entity\AveProduct", mappedBy="packages")
  105.      */
  106.     private Collection $products;
  107.     public function __construct()
  108.     {
  109.         $this->lounges = new ArrayCollection();
  110.         $this->products = new ArrayCollection();
  111.     }
  112.     /**
  113.      * Get id
  114.      *
  115.      * @return int
  116.      */
  117.     public function getId()
  118.     {
  119.         return $this->id;
  120.     }
  121.     /**
  122.      * Set name
  123.      *
  124.      * @param string $name
  125.      *
  126.      * @return AvePackageTemplate
  127.      */
  128.     public function setName($name)
  129.     {
  130.         $this->name = $name;
  131.         return $this;
  132.     }
  133.     /**
  134.      * Get name
  135.      *
  136.      * @return string
  137.      */
  138.     public function getName()
  139.     {
  140.         return $this->name;
  141.     }
  142.     public function getProductNameEn(): ?string
  143.     {
  144.         return $this->productNameEn;
  145.     }
  146.     public function setProductNameEn(?string $productNameEn): self
  147.     {
  148.         $this->productNameEn = $productNameEn;
  149.         return $this;
  150.     }
  151.     /**
  152.      * Set description
  153.      *
  154.      * @param string $description
  155.      *
  156.      * @return AvePackageTemplate
  157.      */
  158.     public function setDescription($description)
  159.     {
  160.         $this->description = $description;
  161.         return $this;
  162.     }
  163.     /**
  164.      * Get description
  165.      *
  166.      * @return string
  167.      */
  168.     public function getDescription()
  169.     {
  170.         return $this->description;
  171.     }
  172.     public function getDescriptionEn(): ?string
  173.     {
  174.         return $this->descriptionEn;
  175.     }
  176.     public function setDescriptionEn(?string $descriptionEn): self
  177.     {
  178.         $this->descriptionEn = $descriptionEn;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Set createdAt
  183.      *
  184.      * @param \DateTime $createdAt
  185.      *
  186.      * @return AvePackageTemplate
  187.      */
  188.     public function setCreatedAt($createdAt)
  189.     {
  190.         $this->createdAt = $createdAt;
  191.         return $this;
  192.     }
  193.     /**
  194.      * Get createdAt
  195.      *
  196.      * @return \DateTime
  197.      */
  198.     public function getCreatedAt()
  199.     {
  200.         return $this->createdAt;
  201.     }
  202.     /**
  203.      * Set createdId
  204.      *
  205.      * @param string $createdId
  206.      *
  207.      * @return AvePackageTemplate
  208.      */
  209.     public function setCreatedId($createdId)
  210.     {
  211.         $this->createdId = $createdId;
  212.         return $this;
  213.     }
  214.     /**
  215.      * Get createdId
  216.      *
  217.      * @return string
  218.      */
  219.     public function getCreatedId()
  220.     {
  221.         return $this->createdId;
  222.     }
  223.     /**
  224.      * Set updatedAt
  225.      *
  226.      * @param \DateTime $updatedAt
  227.      *
  228.      * @return AvePackageTemplate
  229.      */
  230.     public function setUpdatedAt($updatedAt)
  231.     {
  232.         $this->updatedAt = $updatedAt;
  233.         return $this;
  234.     }
  235.     /**
  236.      * Get updatedAt
  237.      *
  238.      * @return \DateTime
  239.      */
  240.     public function getUpdatedAt()
  241.     {
  242.         return $this->updatedAt;
  243.     }
  244.     /**
  245.      * Set updatedId
  246.      *
  247.      * @param string $updatedId
  248.      *
  249.      * @return AvePackageTemplate
  250.      */
  251.     public function setUpdatedId($updatedId)
  252.     {
  253.         $this->updatedId = $updatedId;
  254.         return $this;
  255.     }
  256.     /**
  257.      * Get updatedId
  258.      *
  259.      * @return string
  260.      */
  261.     public function getUpdatedId()
  262.     {
  263.         return $this->updatedId;
  264.     }
  265.     public function getTotalNetPrice(): ?float
  266.     {
  267.         return $this->totalNetPrice;
  268.     }
  269.     public function setTotalNetPrice(float $totalNetPrice): self
  270.     {
  271.         $this->totalNetPrice = $totalNetPrice;
  272.         return $this;
  273.     }
  274.     /**
  275.      * Set aveProductFileId
  276.      *
  277.      * @param integer $aveProductFileId
  278.      *
  279.      * @return AvePackageTemplate
  280.      */
  281.     public function setAveProductFileId($aveProductFileId)
  282.     {
  283.         $this->aveProductFileId = $aveProductFileId;
  284.         return $this;
  285.     }
  286.     /**
  287.      * Get aveProductFileId
  288.      *
  289.      * @return integer
  290.      */
  291.     public function getAveProductFileId()
  292.     {
  293.         return $this->aveProductFileId;
  294.     }
  295.     public function isFeatured(): bool
  296.     {
  297.         return $this->isFeatured;
  298.     }
  299.     public function setIsFeatured(bool $isFeatured): self
  300.     {
  301.         $this->isFeatured = $isFeatured;
  302.         return $this;
  303.     }
  304.     /**
  305.      * @return Collection<int, ReservationLoungeDetails>
  306.      */
  307.     public function getLounges(): Collection
  308.     {
  309.         return $this->lounges;
  310.     }
  311.     public function addLounge(ReservationLoungeDetails $lounge): self
  312.     {
  313.         if (!$this->lounges->contains($lounge)) {
  314.             $this->lounges->add($lounge);
  315.         }
  316.         return $this;
  317.     }
  318.     public function removeLounge(ReservationLoungeDetails $lounge): self
  319.     {
  320.         $this->lounges->removeElement($lounge);
  321.         return $this;
  322.     }
  323.     /**
  324.      * @return Collection<int, AveProduct>
  325.      */
  326.     public function getProducts(): Collection
  327.     {
  328.         return $this->products;
  329.     }
  330.     public function addProduct(AveProduct $product): self
  331.     {
  332.         if (!$this->products->contains($product)) {
  333.             $this->products->add($product);
  334.         }
  335.         return $this;
  336.     }
  337.     public function removeProduct(AveProduct $product): self
  338.     {
  339.         $this->products->removeElement($product);
  340.         return $this;
  341.     }
  342.     /**
  343.      * @return float|null
  344.      */
  345.     public function getPricePackage(): ?float
  346.     {
  347.         return $this->pricePackage;
  348.     }
  349.     /**
  350.      * @param float|null $pricePackage
  351.      * @return AvePackageTemplate
  352.      */
  353.     public function setPricePackage(?float $pricePackage): self
  354.     {
  355.         $this->pricePackage = $pricePackage;
  356.         return $this;
  357.     }
  358.     public function getInternalPrice(): ?float
  359.     {
  360.         return $this->internalPrice;
  361.     }
  362.     public function setInternalPrice(float $internalPrice): self
  363.     {
  364.         $this->internalPrice = $internalPrice;
  365.         return $this;
  366.     }
  367. }