src/Entity/DeliveryPrice.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  6. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  7. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  8. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  12. /**
  13.  * @Doctrine\ORM\Mapping\Entity
  14.  * @Doctrine\ORM\Mapping\Table(name="delivery_price")
  15.  */
  16. class DeliveryPrice implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  17.     use BlameableTrait;
  18.     use TimestampableTrait;
  19.     
  20.     use SoftDeletableTrait;
  21.     
  22. /**
  23.      * @var integer
  24.      *
  25.      * @ORM\Column(name="id", type="integer", nullable=false)
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="IDENTITY")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\DeliveryMethod", inversedBy="prices")
  32.      * @Doctrine\ORM\Mapping\JoinColumn(name="delivery_method_id", referencedColumnName="id")
  33.      */
  34.     private $deliveryMethod;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\Currency")
  37.      */
  38.     private $currency;
  39.     /**
  40.      * @Doctrine\ORM\Mapping\Column(type="decimal", precision=10, scale=2, nullable=true)
  41.      */
  42.     protected $price;
  43.     /**
  44.      * Get id
  45.      *
  46.      * @return integer
  47.      */
  48.     public function getId()
  49.     {
  50.         return $this->id;
  51.     }
  52.     /**
  53.      * Set price
  54.      *
  55.      * @param string $price
  56.      *
  57.      * @return DeliveryPrice
  58.      */
  59.     public function setPrice($price)
  60.     {
  61.         $this->price $price;
  62.         return $this;
  63.     }
  64.     /**
  65.      * Get price
  66.      *
  67.      * @return string
  68.      */
  69.     public function getPrice()
  70.     {
  71.         return $this->price;
  72.     }
  73.     /**
  74.      * Set deliveryMethod
  75.      *
  76.      * @param \App\Entity\DeliveryMethod $deliveryMethod
  77.      *
  78.      * @return DeliveryPrice
  79.      */
  80.     public function setDeliveryMethod(\App\Entity\DeliveryMethod $deliveryMethod null)
  81.     {
  82.         $this->deliveryMethod $deliveryMethod;
  83.         return $this;
  84.     }
  85.     /**
  86.      * Get deliveryMethod
  87.      *
  88.      * @return \App\Entity\DeliveryMethod
  89.      */
  90.     public function getDeliveryMethod()
  91.     {
  92.         return $this->deliveryMethod;
  93.     }
  94.     /**
  95.      * Set currency
  96.      *
  97.      * @param \App\Entity\Currency $currency
  98.      *
  99.      * @return DeliveryPrice
  100.      */
  101.     public function setCurrency(\App\Entity\Currency $currency null)
  102.     {
  103.         $this->currency $currency;
  104.         return $this;
  105.     }
  106.     /**
  107.      * Get currency
  108.      *
  109.      * @return \App\Entity\Currency
  110.      */
  111.     public function getCurrency()
  112.     {
  113.         return $this->currency;
  114.     }
  115. }