src\Entity\Update.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UpdateRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table(name'`update`')]
  6. #[ORM\Entity(repositoryClassUpdateRepository::class)]
  7. class Update
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $version;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $description;
  17.     #[ORM\Column(type'boolean')]
  18.     private $required;
  19.     #[ORM\Column(type'datetime')]
  20.     private $created_at;
  21.     #[ORM\Column(type'boolean')]
  22.     private $status;
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'updates')]
  25.     private $user;
  26.     #[ORM\Column(type'datetime')]
  27.     private $date;
  28.     public function __construct()
  29.     {
  30.         $this->created_at= new \DateTime();
  31.         $this->status false;
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getVersion(): ?string
  38.     {
  39.         return $this->version;
  40.     }
  41.     public function setVersion(string $version): self
  42.     {
  43.         $this->version $version;
  44.         return $this;
  45.     }
  46.     public function getDescription(): ?string
  47.     {
  48.         return $this->description;
  49.     }
  50.     public function setDescription(?string $description): self
  51.     {
  52.         $this->description $description;
  53.         return $this;
  54.     }
  55.     public function getRequired(): ?bool
  56.     {
  57.         return $this->required;
  58.     }
  59.     public function setRequired(bool $required): self
  60.     {
  61.         $this->required $required;
  62.         return $this;
  63.     }
  64.     public function getCreatedAt(): ?\DateTimeInterface
  65.     {
  66.         return $this->created_at;
  67.     }
  68.     public function setCreatedAt(\DateTimeInterface $created_at): self
  69.     {
  70.         $this->created_at $created_at;
  71.         return $this;
  72.     }
  73.     public function getStatus(): ?bool
  74.     {
  75.         return $this->status;
  76.     }
  77.     public function setStatus(bool $status): self
  78.     {
  79.         $this->status $status;
  80.         return $this;
  81.     }
  82.     public function getUser(): ?User
  83.     {
  84.         return $this->user;
  85.     }
  86.     public function setUser(?User $user): self
  87.     {
  88.         $this->user $user;
  89.         return $this;
  90.     }
  91.     public function getDate(): ?\DateTimeInterface
  92.     {
  93.         return $this->date;
  94.     }
  95.     public function setDate(\DateTimeInterface $date): self
  96.     {
  97.         $this->date $date;
  98.         return $this;
  99.     }
  100. }