134 lines
2.6 KiB
PHP
134 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Entity\Document;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Gedmo\Mapping\Annotation as Gedmo;
|
|
use App\Repository\StolenvehicleRepository;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* @ORM\Entity(repositoryClass=StolenvehicleRepository::class)
|
|
*/
|
|
class Stolenvehicle extends Document
|
|
{
|
|
/**
|
|
* @ORM\Column(type="string", length=255)
|
|
* @Gedmo\Versioned
|
|
*/
|
|
private $type;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
* @Gedmo\Versioned
|
|
*/
|
|
private $numberplate;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
* @Gedmo\Versioned
|
|
*/
|
|
private $model;
|
|
|
|
/**
|
|
* @ORM\Column(type="text", length=4294967295, nullable=true)
|
|
* @Gedmo\Versioned
|
|
* @Assert\Length(
|
|
* max=65535,
|
|
* maxMessage="Content too long : {{ limit }} max"
|
|
* )
|
|
*/
|
|
private $content;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
* @Gedmo\Versioned
|
|
*/
|
|
private $color;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity=Directory::class, inversedBy="stolenvehicles")
|
|
* @ORM\JoinColumn(nullable=false)
|
|
*/
|
|
private $directory;
|
|
|
|
public function __construct(User $user)
|
|
{
|
|
parent::__construct($user);
|
|
$this->setNeedLegalAccess(true);
|
|
}
|
|
|
|
public function getType(): ?string
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
public function setType(string $type): self
|
|
{
|
|
$this->type = $type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getNumberplate(): ?string
|
|
{
|
|
return $this->numberplate;
|
|
}
|
|
|
|
public function setNumberplate(?string $numberplate): self
|
|
{
|
|
$this->numberplate = $numberplate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getModel(): ?string
|
|
{
|
|
return $this->model;
|
|
}
|
|
|
|
public function setModel(?string $model): self
|
|
{
|
|
$this->model = $model;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getContent(): ?string
|
|
{
|
|
return $this->content;
|
|
}
|
|
|
|
public function setContent(?string $content): self
|
|
{
|
|
$this->content = $content;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColor(): ?string
|
|
{
|
|
return $this->color;
|
|
}
|
|
|
|
public function setColor(?string $color): self
|
|
{
|
|
$this->color = $color;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDirectory(): ?Directory
|
|
{
|
|
return $this->directory;
|
|
}
|
|
|
|
public function setDirectory(?Directory $directory): self
|
|
{
|
|
$this->directory = $directory;
|
|
|
|
return $this;
|
|
}
|
|
}
|