src/Entity/MarketingRuleProductDiscounted.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Product;
  5. /**
  6. * @ORM\Table(name="marketing_rules_products_discounted")
  7. * @ORM\Entity(repositoryClass="App\Repository\MarketingRuleProductDiscountedRepository")
  8. * @ORM\HasLifecycleCallbacks()
  9. */
  10. class MarketingRuleProductDiscounted
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer", nullable=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /**
  21. * @var \App\Entity\MarketingRule
  22. *
  23. * @ORM\ManyToOne(targetEntity="App\Entity\MarketingRule", inversedBy="productsDiscounted")
  24. * @ORM\JoinColumn(name="marketing_rule_id", referencedColumnName="id", onDelete="CASCADE")
  25. */
  26. private $marketingRule;
  27. /**
  28. * @var \App\Entity\Product
  29. *
  30. * @ORM\ManyToOne(targetEntity="App\Entity\Product")
  31. * @ORM\JoinColumn(name="products_id", referencedColumnName="products_id", onDelete="CASCADE")
  32. */
  33. private $product;
  34. /**
  35. * @ORM\Column(name="price", type="decimal", precision=15, scale=4, nullable=true)
  36. */
  37. private $price;
  38. public function getId(): int {
  39. return $this->id;
  40. }
  41. public function getMarketingRule(): \App\Entity\MarketingRule {
  42. return $this->marketingRule;
  43. }
  44. public function getProduct(): \App\Entity\Product {
  45. return $this->product;
  46. }
  47. public function getPrice() {
  48. return $this->price;
  49. }
  50. public function setId(int $id): void {
  51. $this->id = $id;
  52. }
  53. public function setMarketingRule(\App\Entity\MarketingRule $marketingRule): void {
  54. $this->marketingRule = $marketingRule;
  55. }
  56. public function setProduct(\App\Entity\Product $product): void {
  57. $this->product = $product;
  58. }
  59. public function setPrice($price): void {
  60. $this->price = $price;
  61. }
  62. }