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