<?php
namespace App\Entity;
use App\Entity\Behaviour;
use App\Entity\Sale;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Represent a sale behaviour.
*
* @ORM\Entity(repositoryClass="App\Repository\SaleBehaviourRepository")
*/
class SaleBehaviour extends Behaviour
{
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Sale", inversedBy="behaviours")
*
* @ORM\JoinColumn(name="sale_id", referencedColumnName="id")
*/
protected $sale;
public function __construct(User $user, Sale $sale)
{
parent::__construct($user);
$this->sale = $sale;
}
/**
* Return the sale.
*
* @return Sale
*/
public function getSale()
{
return $this->sale;
}
/**
* Set the sale.
*/
public function setSale(Sale $sale): void
{
$this->sale = $sale;
}
}