src/Entity/Timesheets.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TimesheetsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=TimesheetsRepository::class)
  8.  */
  9. class Timesheets
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({"timesheets.core"})
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=WorkerActivities::class, inversedBy="timesheets")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $worker_activity;
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      * @Groups({"timesheets.core"})
  26.      */
  27.     private $year;
  28.     /**
  29.      * @ORM\Column(type="datetime_immutable")
  30.      * @Groups({"timesheets.core"})
  31.      */
  32.     private $created_at;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable", nullable=true)
  35.      * @Groups({"timesheets.core"})
  36.      */
  37.     private $transformed_at;
  38.     /**
  39.      * @ORM\OneToOne(targetEntity=TimesheetM1::class, mappedBy="timesheet", cascade={"persist", "remove"})
  40.      * @Groups({"timesheets.month"})
  41.      */
  42.     private $m1;
  43.     /**
  44.      * @ORM\OneToOne(targetEntity=TimesheetM2::class, mappedBy="timesheet", cascade={"persist", "remove"})
  45.      * @Groups({"timesheets.month"})
  46.      */
  47.     private $m2;
  48.     /**
  49.      * @ORM\OneToOne(targetEntity=TimesheetM3::class, mappedBy="timesheet", cascade={"persist", "remove"})
  50.      * @Groups({"timesheets.month"})
  51.      */
  52.     private $m3;
  53.     /**
  54.      * @ORM\OneToOne(targetEntity=TimesheetM4::class, mappedBy="timesheet", cascade={"persist", "remove"})
  55.      * @Groups({"timesheets.month"})
  56.      */
  57.     private $m4;
  58.     /**
  59.      * @ORM\OneToOne(targetEntity=TimesheetM5::class, mappedBy="timesheet", cascade={"persist", "remove"})
  60.      * @Groups({"timesheets.month"})
  61.      */
  62.     private $m5;
  63.     /**
  64.      * @ORM\OneToOne(targetEntity=TimesheetM6::class, mappedBy="timesheet", cascade={"persist", "remove"})
  65.      * @Groups({"timesheets.month"})
  66.      */
  67.     private $m6;
  68.     /**
  69.      * @ORM\OneToOne(targetEntity=TimesheetM7::class, mappedBy="timesheet", cascade={"persist", "remove"})
  70.      * @Groups({"timesheets.month"})
  71.      */
  72.     private $m7;
  73.     /**
  74.      * @ORM\OneToOne(targetEntity=TimesheetM8::class, mappedBy="timesheet", cascade={"persist", "remove"})
  75.      * @Groups({"timesheets.month"})
  76.      */
  77.     private $m8;
  78.     /**
  79.      * @ORM\OneToOne(targetEntity=TimesheetM9::class, mappedBy="timesheet", cascade={"persist", "remove"})
  80.      * @Groups({"timesheets.month"})
  81.      */
  82.     private $m9;
  83.     /**
  84.      * @ORM\OneToOne(targetEntity=TimesheetM10::class, mappedBy="timesheet", cascade={"persist", "remove"})
  85.      * @Groups({"timesheets.month"})
  86.      */
  87.     private $m10;
  88.     /**
  89.      * @ORM\OneToOne(targetEntity=TimesheetM11::class, mappedBy="timesheet", cascade={"persist", "remove"})
  90.      * @Groups({"timesheets.month"})
  91.      */
  92.     private $m11;
  93.     /**
  94.      * @ORM\OneToOne(targetEntity=TimesheetM12::class, mappedBy="timesheet", cascade={"persist", "remove"})
  95.      * @Groups({"timesheets.month"})
  96.      */
  97.     private $m12;
  98.     public function getId(): ?int
  99.     {
  100.         return $this->id;
  101.     }
  102.     public function getWorkerActivity(): ?WorkerActivities
  103.     {
  104.         return $this->worker_activity;
  105.     }
  106.     public function setWorkerActivity(?WorkerActivities $worker_activity): self
  107.     {
  108.         $this->worker_activity $worker_activity;
  109.         return $this;
  110.     }
  111.     public function getYear(): ?int
  112.     {
  113.         return $this->year;
  114.     }
  115.     public function setYear(int $year): self
  116.     {
  117.         $this->year $year;
  118.         return $this;
  119.     }
  120.     public function getCreatedAt(): ?\DateTimeImmutable
  121.     {
  122.         return $this->created_at;
  123.     }
  124.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  125.     {
  126.         $this->created_at $created_at;
  127.         return $this;
  128.     }
  129.     public function getTransformatAt(): ?\DateTimeImmutable
  130.     {
  131.         return $this->transformat_at;
  132.     }
  133.     public function setTransformatAt(?\DateTimeImmutable $transformat_at): self
  134.     {
  135.         $this->transformat_at $transformat_at;
  136.         return $this;
  137.     }
  138.     public function getM1(): ?TimesheetM1
  139.     {
  140.         return $this->m1;
  141.     }
  142.     public function setM1(?TimesheetM1 $m1): self
  143.     {
  144.         if ($m1 === null && $this->m1 !== null) {
  145.             $this->m1->setTimesheet(null);
  146.         }
  147.         if ($m1 !== null && $m1->getTimesheet() !== $this) {
  148.             $m1->setTimesheet($this);
  149.         }
  150.         $this->m1 $m1;
  151.         return $this;
  152.     }
  153.     public function getM2(): ?TimesheetM2
  154.     {
  155.         return $this->m2;
  156.     }
  157.     public function setM2(?TimesheetM2 $m2): self
  158.     {
  159.         if ($m2 === null && $this->m2 !== null) {
  160.             $this->m2->setTimesheet(null);
  161.         }
  162.         if ($m2 !== null && $m2->getTimesheet() !== $this) {
  163.             $m2->setTimesheet($this);
  164.         }
  165.         $this->m2 $m2;
  166.         return $this;
  167.     }
  168.     public function getM3(): ?TimesheetM3
  169.     {
  170.         return $this->m3;
  171.     }
  172.     public function setM3(?TimesheetM3 $m3): self
  173.     {
  174.         if ($m3 === null && $this->m3 !== null) {
  175.             $this->m3->setTimesheet(null);
  176.         }
  177.         if ($m3 !== null && $m3->getTimesheet() !== $this) {
  178.             $m3->setTimesheet($this);
  179.         }
  180.         $this->m3 $m3;
  181.         return $this;
  182.     }
  183.     public function getM4(): ?TimesheetM4
  184.     {
  185.         return $this->m4;
  186.     }
  187.     public function setM4(?TimesheetM4 $m4): self
  188.     {
  189.         if ($m4 === null && $this->m4 !== null) {
  190.             $this->m4->setTimesheet(null);
  191.         }
  192.         if ($m4 !== null && $m4->getTimesheet() !== $this) {
  193.             $m4->setTimesheet($this);
  194.         }
  195.         $this->m4 $m4;
  196.         return $this;
  197.     }
  198.     public function getM5(): ?TimesheetM5
  199.     {
  200.         return $this->m5;
  201.     }
  202.     public function setM5(?TimesheetM5 $m5): self
  203.     {
  204.         if ($m5 === null && $this->m5 !== null) {
  205.             $this->m5->setTimesheet(null);
  206.         }
  207.         if ($m5 !== null && $m5->getTimesheet() !== $this) {
  208.             $m5->setTimesheet($this);
  209.         }
  210.         $this->m5 $m5;
  211.         return $this;
  212.     }
  213.     public function getM6(): ?TimesheetM6
  214.     {
  215.         return $this->m6;
  216.     }
  217.     public function setM6(?TimesheetM6 $m6): self
  218.     {
  219.         if ($m6 === null && $this->m6 !== null) {
  220.             $this->m6->setTimesheet(null);
  221.         }
  222.         if ($m6 !== null && $m6->getTimesheet() !== $this) {
  223.             $m6->setTimesheet($this);
  224.         }
  225.         $this->m6 $m6;
  226.         return $this;
  227.     }
  228.     public function getM7(): ?TimesheetM7
  229.     {
  230.         return $this->m7;
  231.     }
  232.     public function setM7(?TimesheetM7 $m7): self
  233.     {
  234.         if ($m7 === null && $this->m7 !== null) {
  235.             $this->m7->setTimesheet(null);
  236.         }
  237.         if ($m7 !== null && $m7->getTimesheet() !== $this) {
  238.             $m7->setTimesheet($this);
  239.         }
  240.         $this->m7 $m7;
  241.         return $this;
  242.     }
  243.     public function getM8(): ?TimesheetM8
  244.     {
  245.         return $this->m8;
  246.     }
  247.     public function setM8(?TimesheetM8 $m8): self
  248.     {
  249.         if ($m8 === null && $this->m8 !== null) {
  250.             $this->m8->setTimesheet(null);
  251.         }
  252.         if ($m8 !== null && $m8->getTimesheet() !== $this) {
  253.             $m8->setTimesheet($this);
  254.         }
  255.         $this->m8 $m8;
  256.         return $this;
  257.     }
  258.     public function getM9(): ?TimesheetM9
  259.     {
  260.         return $this->m9;
  261.     }
  262.     public function setM9(?TimesheetM9 $m9): self
  263.     {
  264.         if ($m9 === null && $this->m9 !== null) {
  265.             $this->m9->setTimesheet(null);
  266.         }
  267.         if ($m9 !== null && $m9->getTimesheet() !== $this) {
  268.             $m9->setTimesheet($this);
  269.         }
  270.         $this->m9 $m9;
  271.         return $this;
  272.     }
  273.     public function getM10(): ?TimesheetM10
  274.     {
  275.         return $this->m10;
  276.     }
  277.     public function setM10(?TimesheetM10 $m10): self
  278.     {
  279.         if ($m10 === null && $this->m10 !== null) {
  280.             $this->m10->setTimesheet(null);
  281.         }
  282.         if ($m10 !== null && $m10->getTimesheet() !== $this) {
  283.             $m10->setTimesheet($this);
  284.         }
  285.         $this->m10 $m10;
  286.         return $this;
  287.     }
  288.     public function getM11(): ?TimesheetM11
  289.     {
  290.         return $this->m11;
  291.     }
  292.     public function setM11(?TimesheetM11 $m11): self
  293.     {
  294.         if ($m11 === null && $this->m11 !== null) {
  295.             $this->m11->setTimesheet(null);
  296.         }
  297.         if ($m11 !== null && $m11->getTimesheet() !== $this) {
  298.             $m11->setTimesheet($this);
  299.         }
  300.         $this->m11 $m11;
  301.         return $this;
  302.     }
  303.     public function getM12(): ?TimesheetM12
  304.     {
  305.         return $this->m12;
  306.     }
  307.     public function setM12(?TimesheetM12 $m12): self
  308.     {
  309.         if ($m12 === null && $this->m12 !== null) {
  310.             $this->m12->setTimesheet(null);
  311.         }
  312.         if ($m12 !== null && $m12->getTimesheet() !== $this) {
  313.             $m12->setTimesheet($this);
  314.         }
  315.         $this->m12 $m12;
  316.         return $this;
  317.     }
  318. }