<?php
namespace App\Entity;
use App\Repository\UpdateRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: '`update`')]
#[ORM\Entity(repositoryClass: UpdateRepository::class)]
class Update
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $version;
#[ORM\Column(type: 'text', nullable: true)]
private $description;
#[ORM\Column(type: 'boolean')]
private $required;
#[ORM\Column(type: 'datetime')]
private $created_at;
#[ORM\Column(type: 'boolean')]
private $status;
#[ORM\JoinColumn(nullable: false)]
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'updates')]
private $user;
#[ORM\Column(type: 'datetime')]
private $date;
public function __construct()
{
$this->created_at= new \DateTime();
$this->status = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getVersion(): ?string
{
return $this->version;
}
public function setVersion(string $version): self
{
$this->version = $version;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getRequired(): ?bool
{
return $this->required;
}
public function setRequired(bool $required): self
{
$this->required = $required;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
}