<?php
namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use App\Constant\ReportStatusConstant;
/**
* FileReport
*
* @ORM\Table(name="file_report")
* @ORM\Entity
*/
class FileReport
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var DateTime
*
* @ORM\Column(name="created_at", type="datetime")
*/
protected $createdAt;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="reports")
* @ORM\JoinColumn(nullable=true)
*/
protected $user;
/**
* @ORM\ManyToOne(targetEntity="File")
* @ORM\JoinColumn(nullable=false)
*/
protected $file;
/**
* @var string
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
protected $name;
/**
* @var string
* @ORM\Column(name="status", type="string", length=255, nullable=false)
*/
protected $status = ReportStatusConstant::WAITING;
/**
* @var string
* @ORM\Column(name="description", type="text", nullable=false)
*/
protected $description;
/**
* @var string
*
* @ORM\Column(name="ip", type="string", length=255, nullable=false)
*/
private $ip;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255, nullable=false)
*/
private $email;
/**
* Get id
*
* @return integer
*/
public function getId(): int
{
return $this->id;
}
/**
* @return DateTime
*/
public function getCreatedAt(): DateTime
{
return $this->createdAt;
}
/**
* @param DateTime $createdAt
* @return FileReport
*/
public function setCreatedAt(DateTime $createdAt): FileReport
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getFile()
{
return $this->file;
}
/**
* @param mixed $file
*/
public function setFile($file)
{
$this->file = $file;
}
/**
* @return string|null
*/
public function getIp(): ?string
{
return $this->ip;
}
/**
* @param string $ip
*/
public function setIp(string $ip)
{
$this->ip = $ip;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param mixed $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string|null
*/
public function getDescription(): ?string
{
return $this->description;
}
/**
* @param string $description
*/
public function setDescription(string $description)
{
$this->description = $description;
}
/**
* @return string|null
*/
public function getStatus(): ?string
{
return $this->status;
}
/**
* @param string $status
*/
public function setStatus(string $status)
{
$this->status = $status;
}
/**
* @return string|null
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail(string $email)
{
$this->email = $email;
}
}