<?php
namespace App\Entity;
use App\Entity\User;
use App\Entity\Vehicle;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity()
*
* @ORM\Table(name="annotation")
*/
class Annotation
{
/**
* @ORM\Id
*
* @ORM\Column(type="bigint")
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @var int
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
*
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*
* @var User
*/
protected $user;
/**
* Related vehicle.
*
* @ORM\ManyToOne(targetEntity="App\Entity\Vehicle")
*
* @ORM\JoinColumn(name="vehicle_id", referencedColumnName="id", onDelete="CASCADE")
*
* @var Vehicle
*/
protected $vehicle;
/**
* @ORM\Column(name="content", type="text")
*
* @var string
*/
protected $content;
/**
* @Gedmo\Timestampable(on="create")
*
* @ORM\Column(type="datetime", name="created_at")
*
* @var \DateTime
*/
protected $createdAt;
/**
* @Gedmo\Timestampable(on="update")
*
* @ORM\Column(type="datetime", name="updated_at")
*
* @var \DateTime
*/
protected $updatedAt;
public function __construct(Vehicle $vehicle, User $user)
{
$this->vehicle = $vehicle;
$this->user = $user;
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* @return self
*/
public function setUser(User $user)
{
$this->user = $user;
return $this;
}
/**
* @return Vehicle
*/
public function getVehicle()
{
return $this->vehicle;
}
/**
* @return self
*/
public function setVehicle(Vehicle $vehicle)
{
$this->vehicle = $vehicle;
return $this;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string $content
*
* @return self
*/
public function setContent($content)
{
$this->content = $content;
return $this;
}
/**
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @return self
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* @return self
*/
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
}