<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Product;
/**
* @ORM\Table(name="marketing_rules_products_requested")
* @ORM\Entity
* @ORM\HasLifecycleCallbacks()
*/
class MarketingRuleProductRequested
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var \App\Entity\MarketingRule
*
* @ORM\ManyToOne(targetEntity="App\Entity\MarketingRule", inversedBy="productsRequested")
* @ORM\JoinColumn(name="marketing_rule_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $marketingRule;
/**
* @var \App\Entity\Product
*
* @ORM\ManyToOne(targetEntity="App\Entity\Product")
* @ORM\JoinColumn(name="products_id", referencedColumnName="products_id", onDelete="CASCADE")
*/
private $product;
public function getId(): int {
return $this->id;
}
public function getMarketingRule(): \App\Entity\MarketingRule {
return $this->marketingRule;
}
public function getProduct(): \App\Entity\Product {
return $this->product;
}
public function setId(int $id): void {
$this->id = $id;
}
public function setMarketingRule(\App\Entity\MarketingRule $marketingRule): void {
$this->marketingRule = $marketingRule;
}
public function setProduct(\App\Entity\Product $product): void {
$this->product = $product;
}
}