src/Entity/ActionPlanTasks.php line 41

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