src/Entity/ItemCategoryPromotionPrice.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\CommonTrait;
  4. use App\Repository\ItemCategoryPromotionPriceRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ItemCategoryPromotionPriceRepository::class)
  9.  * @ORM\Table(name="itm_category_promo_price")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @UniqueEntity({"uuid"})
  12.  */
  13. class ItemCategoryPromotionPrice
  14. {
  15.     use CommonTrait;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=ItemCategory::class, inversedBy="itemCategoryPromotionPrices")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $itemCategory;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=ItemPromotion::class)
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $itemPromotion;
  26.     /**
  27.      * @ORM\Column(type="decimal", precision=10, scale=2)
  28.      */
  29.     private $price;
  30.     public function getItemCategory(): ?ItemCategory
  31.     {
  32.         return $this->itemCategory;
  33.     }
  34.     public function setItemCategory(?ItemCategory $itemCategory): self
  35.     {
  36.         $this->itemCategory $itemCategory;
  37.         return $this;
  38.     }
  39.     public function getItemPromotion(): ?ItemPromotion
  40.     {
  41.         return $this->itemPromotion;
  42.     }
  43.     public function setItemPromotion(?ItemPromotion $itemPromotion): self
  44.     {
  45.         $this->itemPromotion $itemPromotion;
  46.         return $this;
  47.     }
  48.     public function getPrice(): ?string
  49.     {
  50.         return $this->price;
  51.     }
  52.     public function setPrice(string $price): self
  53.     {
  54.         $this->price $price;
  55.         return $this;
  56.     }
  57. }