<?phpnamespace App\Entity;use App\Repository\VehicleTheftRepository;use DateTime;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: VehicleTheftRepository::class)]#[ORM\Table(name: 'vehicle_theft')]class VehicleTheft{ #[ORM\Column(name: 'id', type: 'integer')] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] private ?int $id; #[ORM\Column(type: 'boolean')] private bool $isDeleted = false; #[ORM\Column(name: 'createdAt', type: 'datetime')] private DateTime $createdAt; #[ORM\ManyToOne(targetEntity: 'App\Entity\Vehicle', inversedBy: 'theft', fetch: 'EXTRA_LAZY')] #[ORM\JoinColumn(nullable: true)] private ?Vehicle $vehicle; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $commune; public function __construct() { $this->createdAt = new DateTime(); } public function __toString() { return "#" . $this->id; } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Get isDeleted. * * @return bool */ public function getIsDeleted() { return $this->isDeleted; } /** * Set isDeleted. * * @param bool $isDeleted * * @return VehicleTheft */ public function setIsDeleted($isDeleted) { $this->isDeleted = $isDeleted; return $this; } /** * Get createdAt. * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set createdAt. * * @param \DateTime $createdAt * * @return VehicleTheft */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get commune. * * @return string|null */ public function getCommune() { return $this->commune; } /** * Set commune. * * @param string|null $commune * * @return VehicleTheft */ public function setCommune($commune = null) { $this->commune = $commune; return $this; } /** * Get vehicle. * * @return \App\Entity\Vehicle|null */ public function getVehicle() { return $this->vehicle; } /** * Set vehicle. * * @param \App\Entity\Vehicle|null $vehicle * * @return VehicleTheft */ public function setVehicle(\App\Entity\Vehicle $vehicle = null) { $this->vehicle = $vehicle; return $this; }}