<?php
namespace App\Entity;
use App\Repository\WorkerTimesheetHistoriesRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=WorkerTimesheetHistoriesRepository::class)
*/
class WorkerTimesheetHistories
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({
* "timesheet.history.base"
* })
*/
private $id;
/**
* @ORM\Column(type="json", nullable=true)
* @Groups({
* "timesheet.history.base"
* })
*/
private $history = [];
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({
* "timesheet.history.base"
* })
*/
private $created_at;
/**
* @ORM\OneToOne(targetEntity=WorkerTimesheet::class, inversedBy="worker_timesheet_histories", cascade={"persist", "remove"})
*/
private $worker_timesheet;
public function getId(): ?int
{
return $this->id;
}
public function getHistory(): ?array
{
return $this->history;
}
public function setHistory(?array $history): self
{
$this->history = $history;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getWorkerTimesheet(): ?WorkerTimesheet
{
return $this->worker_timesheet;
}
public function setWorkerTimesheet(?WorkerTimesheet $worker_timesheet): self
{
$this->worker_timesheet = $worker_timesheet;
return $this;
}
}