src/Entity/FileReport.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Constant\ReportStatusConstant;
  6. /**
  7.  * FileReport
  8.  *
  9.  * @ORM\Table(name="file_report")
  10.  * @ORM\Entity
  11.  */
  12. class FileReport
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\Column(type="integer")
  17.      * @ORM\GeneratedValue(strategy="AUTO")
  18.      */
  19.     protected $id;
  20.     /**
  21.      * @var DateTime
  22.      *
  23.      * @ORM\Column(name="created_at", type="datetime")
  24.      */
  25.     protected $createdAt;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="User", inversedBy="reports")
  28.      * @ORM\JoinColumn(nullable=true)
  29.      */
  30.     protected $user;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="File")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     protected $file;
  36.     /**
  37.      * @var string
  38.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  39.      */
  40.     protected $name;
  41.     /**
  42.      * @var string
  43.      * @ORM\Column(name="status", type="string", length=255, nullable=false)
  44.      */
  45.     protected $status ReportStatusConstant::WAITING;
  46.     /**
  47.      * @var string
  48.      * @ORM\Column(name="description", type="text", nullable=false)
  49.      */
  50.     protected $description;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(name="ip", type="string", length=255, nullable=false)
  55.      */
  56.     private $ip;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="email", type="string", length=255, nullable=false)
  61.      */
  62.     private $email;
  63.     /**
  64.      * Get id
  65.      *
  66.      * @return integer
  67.      */
  68.     public function getId(): int
  69.     {
  70.         return $this->id;
  71.     }
  72.     /**
  73.      * @return DateTime
  74.      */
  75.     public function getCreatedAt(): DateTime
  76.     {
  77.         return $this->createdAt;
  78.     }
  79.     /**
  80.      * @param DateTime $createdAt
  81.      * @return FileReport
  82.      */
  83.     public function setCreatedAt(DateTime $createdAt): FileReport
  84.     {
  85.         $this->createdAt $createdAt;
  86.         return $this;
  87.     }
  88.     /**
  89.      * @return mixed
  90.      */
  91.     public function getUser()
  92.     {
  93.         return $this->user;
  94.     }
  95.     /**
  96.      * @param mixed $user
  97.      */
  98.     public function setUser($user)
  99.     {
  100.         $this->user $user;
  101.     }
  102.     /**
  103.      * @return mixed
  104.      */
  105.     public function getFile()
  106.     {
  107.         return $this->file;
  108.     }
  109.     /**
  110.      * @param mixed $file
  111.      */
  112.     public function setFile($file)
  113.     {
  114.         $this->file $file;
  115.     }
  116.     /**
  117.      * @return string|null
  118.      */
  119.     public function getIp(): ?string
  120.     {
  121.         return $this->ip;
  122.     }
  123.     /**
  124.      * @param string $ip
  125.      */
  126.     public function setIp(string $ip)
  127.     {
  128.         $this->ip $ip;
  129.     }
  130.     /**
  131.      * @return string|null
  132.      */
  133.     public function getName(): ?string
  134.     {
  135.         return $this->name;
  136.     }
  137.     /**
  138.      * @param mixed $name
  139.      */
  140.     public function setName($name)
  141.     {
  142.         $this->name $name;
  143.     }
  144.     /**
  145.      * @return string|null
  146.      */
  147.     public function getDescription(): ?string
  148.     {
  149.         return $this->description;
  150.     }
  151.     /**
  152.      * @param string $description
  153.      */
  154.     public function setDescription(string $description)
  155.     {
  156.         $this->description $description;
  157.     }
  158.     /**
  159.      * @return string|null
  160.      */
  161.     public function getStatus(): ?string
  162.     {
  163.         return $this->status;
  164.     }
  165.     /**
  166.      * @param string $status
  167.      */
  168.     public function setStatus(string $status)
  169.     {
  170.         $this->status $status;
  171.     }
  172.     /**
  173.      * @return string|null
  174.      */
  175.     public function getEmail(): ?string
  176.     {
  177.         return $this->email;
  178.     }
  179.     /**
  180.      * @param string $email
  181.      */
  182.     public function setEmail(string $email)
  183.     {
  184.         $this->email $email;
  185.     }
  186. }