<?php
namespace App\Entity;
use App\Repository\ChantierHistoriqueRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ChantierHistoriqueRepository::class)
*/
class ChantierHistorique
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $old_status;
/**
* @ORM\Column(type="string", length=255)
*/
private $new_status;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* * @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\Column(type="date")
*/
private $change_date;
/**
* @ORM\ManyToOne(targetEntity=Chantier::class, inversedBy="chantierHistoriques")
* @ORM\JoinColumn(nullable=false)
*/
private $chantier;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getOldStatus(): ?string
{
return $this->old_status;
}
public function setOldStatus(string $old_status): self
{
$this->old_status = $old_status;
return $this;
}
public function getNewStatus(): ?string
{
return $this->new_status;
}
public function setNewStatus(string $new_status): self
{
$this->new_status = $new_status;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getChangeDate(): ?\DateTimeInterface
{
return $this->change_date;
}
public function setChangeDate(\DateTimeInterface $change_date): self
{
$this->change_date = $change_date;
return $this;
}
public function getChantier(): ?Chantier
{
return $this->chantier;
}
public function setChantier(?Chantier $chantier): self
{
$this->chantier = $chantier;
return $this;
}
}