src/Entity/Indicator.php line 20

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Entity\Mapped\NamedEntity;
  6. use App\Repository\IndicatorRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. #[ORM\Entity(
  10.     repositoryClassIndicatorRepository::class
  11. )]
  12. #[ORM\Table(
  13.     name'indicator'
  14. )]
  15. #[ApiResource]
  16. class Indicator extends NamedEntity
  17. {
  18.     #[ORM\Column(
  19.         name'type',
  20.         type'string',
  21.         nullabletrue
  22.     )]
  23.     private ?string $type null;
  24.     #[ORM\Column(
  25.         name'start_point',
  26.         type'decimal',
  27.         precision20,
  28.         scale2,
  29.         nullabletrue
  30.     )]
  31.     private ?string $startPoint null;
  32.     #[ORM\Column(
  33.         name'end_point',
  34.         type'decimal',
  35.         precision20,
  36.         scale2,
  37.         nullabletrue
  38.     )]
  39.     private ?string $endPoint null;
  40.     #[ORM\Column(
  41.         name'frequency',
  42.         type'text',
  43.         nullabletrue
  44.     )]
  45.     private ?string $frequency null;
  46.     #[ORM\Column(
  47.         name'deadline',
  48.         type'text',
  49.         nullabletrue
  50.     )]
  51.     private ?string $deadline null;
  52.     #[ORM\Column(
  53.         name'explanation',
  54.         type'text',
  55.         nullabletrue
  56.     )]
  57.     private ?string $explanation null;
  58.     #[ORM\ManyToOne(
  59.         targetEntityProject::class,
  60.         inversedBy'indicators'
  61.     )]
  62.     #[ORM\JoinColumn(
  63.         name'project'
  64.     )]
  65.     private ?Project $project null;
  66.     #[ORM\ManyToOne(
  67.         targetEntityGoal::class,
  68.         inversedBy'indicators'
  69.     )]
  70.     #[Assert\NotBlank(
  71.         groups: ['action']
  72.     )]
  73.     #[ORM\JoinColumn(
  74.         name'goal'
  75.     )]
  76.     private ?Goal $goal null;
  77.     public function getType(): ?string
  78.     {
  79.         return $this->type;
  80.     }
  81.     public function setType(?string $type): self
  82.     {
  83.         $this->type $type;
  84.         return $this;
  85.     }
  86.     public function getStartPoint(): ?string
  87.     {
  88.         return $this->startPoint;
  89.     }
  90.     public function setStartPoint(?string $startPoint): self
  91.     {
  92.         $this->startPoint $startPoint;
  93.         return $this;
  94.     }
  95.     public function getEndPoint(): ?string
  96.     {
  97.         return $this->endPoint;
  98.     }
  99.     public function setEndPoint(?string $endPoint): self
  100.     {
  101.         $this->endPoint $endPoint;
  102.         return $this;
  103.     }
  104.     public function getFrequency(): ?string
  105.     {
  106.         return $this->frequency;
  107.     }
  108.     public function setFrequency(?string $frequency): self
  109.     {
  110.         $this->frequency $frequency;
  111.         return $this;
  112.     }
  113.     
  114.     public function getDeadline(): ?string
  115.     {
  116.         return $this->deadline;
  117.     }
  118.     public function setDeadline(?string $deadline): self
  119.     {
  120.         $this->deadline $deadline;
  121.         return $this;
  122.     }
  123.     public function getExplanation(): ?string
  124.     {
  125.         return $this->explanation;
  126.     }
  127.     public function setExplanation(?string $explanation): self
  128.     {
  129.         $this->explanation $explanation;
  130.         return $this;
  131.     }
  132.     public function getProject(): ?Project
  133.     {
  134.         return $this->project;
  135.     }
  136.     public function setProject(?Project $project): self
  137.     {
  138.         $this->project $project;
  139.         return $this;
  140.     }
  141.     public function getGoal(): ?Goal
  142.     {
  143.         return $this->goal;
  144.     }
  145.     public function setGoal(?Goal $goal): self
  146.     {
  147.         $this->goal $goal;
  148.         return $this;
  149.     }
  150. }