src/Entity/ActionPlanTasks.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\ActionPlanTasksRepository;
  5. use App\Traits\AutoTimestampTrait;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. #[ORM\Entity(repositoryClassActionPlanTasksRepository::class)]
  10. #[ApiResource(
  11.     normalizationContext: ['groups' => ['task.get']],
  12.     denormalizationContext: ['groups' => ['task.write']],
  13. )]
  14. #[ORM\HasLifecycleCallbacks]
  15. class ActionPlanTasks
  16. {
  17.     use AutoTimestampTrait;
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue]
  20.     #[ORM\Column]
  21.     #[Groups(['task.get''task.write''plan.get' ])]
  22.     private ?int $id null;
  23.     #[ORM\Column(length255)]
  24.     #[Groups(['task.get''task.write''plan.get'])]
  25.     private ?string $title null;
  26.     #[ORM\ManyToOne]
  27.     #[Groups(['task.get''task.write''plan.get'])]
  28.     private ?User $userInCharge null;
  29.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  30.     #[Groups(['task.get''task.write''plan.get'])]
  31.     private ?\DateTimeInterface $startDate null;
  32.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  33.     #[Groups(['task.get''task.write''plan.get'])]
  34.     private ?\DateTimeInterface $endDate null;
  35.     #[ORM\Column(nullabletrue)]
  36.     #[Groups(['task.get''task.write''plan.get'])]
  37.     private ?int $rateProgress null;
  38.     #[ORM\ManyToOne(inversedBy'actionPlanTasks')]
  39.     #[ORM\JoinColumn(nullablefalse)]
  40.     #[Groups(['task.write'])]
  41.     private ?ActionPlan $actionPlan null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     #[Groups(['task.get''task.write''plan.get'])]
  44.     private ?string $thematic null;
  45.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  46.     #[Groups(['task.get''task.write''plan.get'])]
  47.     private ?string $description null;
  48.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  49.     #[Groups(['task.get''task.write''plan.get'])]
  50.     private ?string $comment null;
  51.     #[ORM\Column(nullabletrue)]
  52.     #[Groups(['task.get''task.write''plan.get'])]
  53.     private ?bool $reminderFixed null;
  54.     #[ORM\Column(nullabletrue)]
  55.     #[Groups(['task.get''task.write''plan.get'])]
  56.     private ?int $reminderBeforeDeadline null;
  57.     #[ORM\Column(nullabletrue)]
  58.     #[Groups(['task.get''task.write''plan.get'])]
  59.     private ?bool $reminderPeriodic null;
  60.     #[ORM\Column(nullabletrue)]
  61.     #[Groups(['task.get''task.write''plan.get'])]
  62.     private ?int $periodicReminderTime null;
  63.     #[ORM\ManyToOne]
  64.     #[Groups(['task.get''task.write''plan.get'])]
  65.     private ?User $createdBy null;
  66.     #[ORM\ManyToOne]
  67.     #[Groups(['task.get''task.write''plan.get'])]
  68.     private ?User $updatedBy null;
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function getTitle(): ?string
  74.     {
  75.         return $this->title;
  76.     }
  77.     public function setTitle(string $title): self
  78.     {
  79.         $this->title $title;
  80.         return $this;
  81.     }
  82.     public function getUserInCharge(): ?User
  83.     {
  84.         return $this->userInCharge;
  85.     }
  86.     public function setUserInCharge(?User $userInCharge): self
  87.     {
  88.         $this->userInCharge $userInCharge;
  89.         return $this;
  90.     }
  91.     public function getStartDate(): ?\DateTimeInterface
  92.     {
  93.         return $this->startDate;
  94.     }
  95.     public function setStartDate(?\DateTimeInterface $startDate): self
  96.     {
  97.         $this->startDate $startDate;
  98.         return $this;
  99.     }
  100.     public function getEndDate(): ?\DateTimeInterface
  101.     {
  102.         return $this->endDate;
  103.     }
  104.     public function setEndDate(?\DateTimeInterface $endDate): self
  105.     {
  106.         $this->endDate $endDate;
  107.         return $this;
  108.     }
  109.     public function getRateProgress(): ?int
  110.     {
  111.         return $this->rateProgress;
  112.     }
  113.     public function setRateProgress(?int $rateProgress): self
  114.     {
  115.         $this->rateProgress $rateProgress;
  116.         return $this;
  117.     }
  118.     public function getActionPlan(): ?ActionPlan
  119.     {
  120.         return $this->actionPlan;
  121.     }
  122.     public function setActionPlan(?ActionPlan $actionPlan): self
  123.     {
  124.         $this->actionPlan $actionPlan;
  125.         return $this;
  126.     }
  127.     public function getThematic(): ?string
  128.     {
  129.         return $this->thematic;
  130.     }
  131.     public function setThematic(?string $thematic): self
  132.     {
  133.         $this->thematic $thematic;
  134.         return $this;
  135.     }
  136.     public function getDescription(): ?string
  137.     {
  138.         return $this->description;
  139.     }
  140.     public function setDescription(?string $description): self
  141.     {
  142.         $this->description $description;
  143.         return $this;
  144.     }
  145.     public function getComment(): ?string
  146.     {
  147.         return $this->comment;
  148.     }
  149.     public function setComment(?string $comment): self
  150.     {
  151.         $this->comment $comment;
  152.         return $this;
  153.     }
  154.     public function isReminderFixed(): ?bool
  155.     {
  156.         return $this->reminderFixed;
  157.     }
  158.     public function setReminderFixed(?bool $reminderFixed): self
  159.     {
  160.         $this->reminderFixed $reminderFixed;
  161.         return $this;
  162.     }
  163.     public function getReminderBeforeDeadline(): ?int
  164.     {
  165.         return $this->reminderBeforeDeadline;
  166.     }
  167.     public function setReminderBeforeDeadline(?int $reminderBeforeDeadline): self
  168.     {
  169.         $this->reminderBeforeDeadline $reminderBeforeDeadline;
  170.         return $this;
  171.     }
  172.     public function isReminderPeriodic(): ?bool
  173.     {
  174.         return $this->reminderPeriodic;
  175.     }
  176.     public function setReminderPeriodic(?bool $reminderPeriodic): self
  177.     {
  178.         $this->reminderPeriodic $reminderPeriodic;
  179.         return $this;
  180.     }
  181.     public function getPeriodicReminderTime(): ?int
  182.     {
  183.         return $this->periodicReminderTime;
  184.     }
  185.     public function setPeriodicReminderTime(?int $periodicReminderTime): self
  186.     {
  187.         $this->periodicReminderTime $periodicReminderTime;
  188.         return $this;
  189.     }
  190.     public function getCreatedBy(): ?User
  191.     {
  192.         return $this->createdBy;
  193.     }
  194.     public function setCreatedBy(?User $createdBy): self
  195.     {
  196.         $this->createdBy $createdBy;
  197.         return $this;
  198.     }
  199.     public function getUpdatedBy(): ?User
  200.     {
  201.         return $this->updatedBy;
  202.     }
  203.     public function setUpdatedBy(?User $updatedBy): self
  204.     {
  205.         $this->updatedBy $updatedBy;
  206.         return $this;
  207.     }
  208. }