<?php
namespace App\Entity;
use App\Repository\NewArticleRepository;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* @ORM\Entity(repositoryClass=NewArticleRepository::class)
*/
class NewArticle
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Articles::class, inversedBy="newArticles")
* @ORM\JoinColumn(nullable=false)
*/
private $article;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="datetime")
*/
private $start;
/**
* @ORM\Column(type="datetime")
*/
private $end;
public function __construct()
{
$this->createdAt = new DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getArticle(): ?Articles
{
return $this->article;
}
public function setArticle(?Articles $article): self
{
$this->article = $article;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getStart(): ?\DateTimeInterface
{
return $this->start;
}
public function setStart(\DateTimeInterface $start): self
{
$this->start = $start;
return $this;
}
public function getEnd(): ?\DateTimeInterface
{
return $this->end;
}
public function setEnd(\DateTimeInterface $end): self
{
$this->end = $end;
return $this;
}
}