src/Entity/WorkerTimesheetHistories.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WorkerTimesheetHistoriesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=WorkerTimesheetHistoriesRepository::class)
  8.  */
  9. class WorkerTimesheetHistories
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({
  16.      *      "timesheet.history.base"
  17.      *  })
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="json", nullable=true)
  22.      * @Groups({
  23.      *       "timesheet.history.base"
  24.      *   })
  25.      */
  26.     private $history = [];
  27.     /**
  28.      * @ORM\Column(type="datetime_immutable", nullable=true)
  29.      * @Groups({
  30.      *       "timesheet.history.base"
  31.      *   })
  32.      */
  33.     private $created_at;
  34.     /**
  35.      * @ORM\OneToOne(targetEntity=WorkerTimesheet::class, inversedBy="worker_timesheet_histories", cascade={"persist", "remove"})
  36.      */
  37.     private $worker_timesheet;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getHistory(): ?array
  43.     {
  44.         return $this->history;
  45.     }
  46.     public function setHistory(?array $history): self
  47.     {
  48.         $this->history $history;
  49.         return $this;
  50.     }
  51.     public function getCreatedAt(): ?\DateTimeImmutable
  52.     {
  53.         return $this->created_at;
  54.     }
  55.     public function setCreatedAt(?\DateTimeImmutable $created_at): self
  56.     {
  57.         $this->created_at $created_at;
  58.         return $this;
  59.     }
  60.     public function getWorkerTimesheet(): ?WorkerTimesheet
  61.     {
  62.         return $this->worker_timesheet;
  63.     }
  64.     public function setWorkerTimesheet(?WorkerTimesheet $worker_timesheet): self
  65.     {
  66.         $this->worker_timesheet $worker_timesheet;
  67.         return $this;
  68.     }
  69. }