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

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