src/Entity/PaymentMethodPrice.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="payment_price")
  15.  */
  16. class PaymentMethodPrice 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.      * @ORM\ManyToOne(targetEntity="App\Entity\Currency")
  32.      */
  33.     private $currency;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="App\Entity\PaymentMethod", inversedBy="prices")
  36.      */
  37.     private $paymentMethod;
  38.     /**
  39.      * @Doctrine\ORM\Mapping\Column(type="decimal", precision=10, scale=2, nullable=true)
  40.      */
  41.     protected $price;
  42.     /**
  43.      * Get id
  44.      *
  45.      * @return integer
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * Set price
  53.      *
  54.      * @param string $price
  55.      *
  56.      * @return PaymentMethodPrice
  57.      */
  58.     public function setPrice($price)
  59.     {
  60.         $this->price $price;
  61.         return $this;
  62.     }
  63.     /**
  64.      * Get price
  65.      *
  66.      * @return string
  67.      */
  68.     public function getPrice()
  69.     {
  70.         return $this->price;
  71.     }
  72.     /**
  73.      * Set currency
  74.      *
  75.      * @param \App\Entity\Currency $currency
  76.      *
  77.      * @return PaymentMethodPrice
  78.      */
  79.     public function setCurrency(\App\Entity\Currency $currency null)
  80.     {
  81.         $this->currency $currency;
  82.         return $this;
  83.     }
  84.     /**
  85.      * Get currency
  86.      *
  87.      * @return \App\Entity\Currency
  88.      */
  89.     public function getCurrency()
  90.     {
  91.         return $this->currency;
  92.     }
  93.     /**
  94.      * Set paymentMethod
  95.      *
  96.      * @param \App\Entity\PaymentMethod $paymentMethod
  97.      *
  98.      * @return PaymentMethodPrice
  99.      */
  100.     public function setPaymentMethod(\App\Entity\PaymentMethod $paymentMethod null)
  101.     {
  102.         $this->paymentMethod $paymentMethod;
  103.         return $this;
  104.     }
  105.     /**
  106.      * Get paymentMethod
  107.      *
  108.      * @return \App\Entity\PaymentMethod
  109.      */
  110.     public function getPaymentMethod()
  111.     {
  112.         return $this->paymentMethod;
  113.     }
  114. }