<?php
namespace App\Entity;
use App\Repository\TimesheetsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=TimesheetsRepository::class)
*/
class Timesheets
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"timesheets.core"})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=WorkerActivities::class, inversedBy="timesheets")
* @ORM\JoinColumn(nullable=false)
*/
private $worker_activity;
/**
* @ORM\Column(type="integer")
* @Groups({"timesheets.core"})
*/
private $year;
/**
* @ORM\Column(type="datetime_immutable")
* @Groups({"timesheets.core"})
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({"timesheets.core"})
*/
private $transformed_at;
/**
* @ORM\OneToOne(targetEntity=TimesheetM1::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m1;
/**
* @ORM\OneToOne(targetEntity=TimesheetM2::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m2;
/**
* @ORM\OneToOne(targetEntity=TimesheetM3::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m3;
/**
* @ORM\OneToOne(targetEntity=TimesheetM4::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m4;
/**
* @ORM\OneToOne(targetEntity=TimesheetM5::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m5;
/**
* @ORM\OneToOne(targetEntity=TimesheetM6::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m6;
/**
* @ORM\OneToOne(targetEntity=TimesheetM7::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m7;
/**
* @ORM\OneToOne(targetEntity=TimesheetM8::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m8;
/**
* @ORM\OneToOne(targetEntity=TimesheetM9::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m9;
/**
* @ORM\OneToOne(targetEntity=TimesheetM10::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m10;
/**
* @ORM\OneToOne(targetEntity=TimesheetM11::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m11;
/**
* @ORM\OneToOne(targetEntity=TimesheetM12::class, mappedBy="timesheet", cascade={"persist", "remove"})
* @Groups({"timesheets.month"})
*/
private $m12;
public function getId(): ?int
{
return $this->id;
}
public function getWorkerActivity(): ?WorkerActivities
{
return $this->worker_activity;
}
public function setWorkerActivity(?WorkerActivities $worker_activity): self
{
$this->worker_activity = $worker_activity;
return $this;
}
public function getYear(): ?int
{
return $this->year;
}
public function setYear(int $year): self
{
$this->year = $year;
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 getTransformatAt(): ?\DateTimeImmutable
{
return $this->transformat_at;
}
public function setTransformatAt(?\DateTimeImmutable $transformat_at): self
{
$this->transformat_at = $transformat_at;
return $this;
}
public function getM1(): ?TimesheetM1
{
return $this->m1;
}
public function setM1(?TimesheetM1 $m1): self
{
if ($m1 === null && $this->m1 !== null) {
$this->m1->setTimesheet(null);
}
if ($m1 !== null && $m1->getTimesheet() !== $this) {
$m1->setTimesheet($this);
}
$this->m1 = $m1;
return $this;
}
public function getM2(): ?TimesheetM2
{
return $this->m2;
}
public function setM2(?TimesheetM2 $m2): self
{
if ($m2 === null && $this->m2 !== null) {
$this->m2->setTimesheet(null);
}
if ($m2 !== null && $m2->getTimesheet() !== $this) {
$m2->setTimesheet($this);
}
$this->m2 = $m2;
return $this;
}
public function getM3(): ?TimesheetM3
{
return $this->m3;
}
public function setM3(?TimesheetM3 $m3): self
{
if ($m3 === null && $this->m3 !== null) {
$this->m3->setTimesheet(null);
}
if ($m3 !== null && $m3->getTimesheet() !== $this) {
$m3->setTimesheet($this);
}
$this->m3 = $m3;
return $this;
}
public function getM4(): ?TimesheetM4
{
return $this->m4;
}
public function setM4(?TimesheetM4 $m4): self
{
if ($m4 === null && $this->m4 !== null) {
$this->m4->setTimesheet(null);
}
if ($m4 !== null && $m4->getTimesheet() !== $this) {
$m4->setTimesheet($this);
}
$this->m4 = $m4;
return $this;
}
public function getM5(): ?TimesheetM5
{
return $this->m5;
}
public function setM5(?TimesheetM5 $m5): self
{
if ($m5 === null && $this->m5 !== null) {
$this->m5->setTimesheet(null);
}
if ($m5 !== null && $m5->getTimesheet() !== $this) {
$m5->setTimesheet($this);
}
$this->m5 = $m5;
return $this;
}
public function getM6(): ?TimesheetM6
{
return $this->m6;
}
public function setM6(?TimesheetM6 $m6): self
{
if ($m6 === null && $this->m6 !== null) {
$this->m6->setTimesheet(null);
}
if ($m6 !== null && $m6->getTimesheet() !== $this) {
$m6->setTimesheet($this);
}
$this->m6 = $m6;
return $this;
}
public function getM7(): ?TimesheetM7
{
return $this->m7;
}
public function setM7(?TimesheetM7 $m7): self
{
if ($m7 === null && $this->m7 !== null) {
$this->m7->setTimesheet(null);
}
if ($m7 !== null && $m7->getTimesheet() !== $this) {
$m7->setTimesheet($this);
}
$this->m7 = $m7;
return $this;
}
public function getM8(): ?TimesheetM8
{
return $this->m8;
}
public function setM8(?TimesheetM8 $m8): self
{
if ($m8 === null && $this->m8 !== null) {
$this->m8->setTimesheet(null);
}
if ($m8 !== null && $m8->getTimesheet() !== $this) {
$m8->setTimesheet($this);
}
$this->m8 = $m8;
return $this;
}
public function getM9(): ?TimesheetM9
{
return $this->m9;
}
public function setM9(?TimesheetM9 $m9): self
{
if ($m9 === null && $this->m9 !== null) {
$this->m9->setTimesheet(null);
}
if ($m9 !== null && $m9->getTimesheet() !== $this) {
$m9->setTimesheet($this);
}
$this->m9 = $m9;
return $this;
}
public function getM10(): ?TimesheetM10
{
return $this->m10;
}
public function setM10(?TimesheetM10 $m10): self
{
if ($m10 === null && $this->m10 !== null) {
$this->m10->setTimesheet(null);
}
if ($m10 !== null && $m10->getTimesheet() !== $this) {
$m10->setTimesheet($this);
}
$this->m10 = $m10;
return $this;
}
public function getM11(): ?TimesheetM11
{
return $this->m11;
}
public function setM11(?TimesheetM11 $m11): self
{
if ($m11 === null && $this->m11 !== null) {
$this->m11->setTimesheet(null);
}
if ($m11 !== null && $m11->getTimesheet() !== $this) {
$m11->setTimesheet($this);
}
$this->m11 = $m11;
return $this;
}
public function getM12(): ?TimesheetM12
{
return $this->m12;
}
public function setM12(?TimesheetM12 $m12): self
{
if ($m12 === null && $this->m12 !== null) {
$this->m12->setTimesheet(null);
}
if ($m12 !== null && $m12->getTimesheet() !== $this) {
$m12->setTimesheet($this);
}
$this->m12 = $m12;
return $this;
}
}