src/Entity/ObjectiveTargetScore.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ObjectiveTargetScoreRepository;
  4. use App\Traits\DateTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use JMS\Serializer\Annotation as Serializer;
  7. use JMS\Serializer\Annotation\Expose;
  8. use JMS\Serializer\Annotation\Groups;
  9. /**
  10. * @ORM\Entity(repositoryClass=ObjectiveTargetScoreRepository::class)
  11. * @ORM\HasLifecycleCallbacks()
  12. * @Serializer\ExclusionPolicy("ALL")
  13. */
  14. class ObjectiveTargetScore
  15. {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue
  19. * @ORM\Column(type="integer")
  20. *
  21. * @Expose
  22. * @Groups({"objective_target_score"})
  23. */
  24. private ?int $id = null;
  25. /**
  26. * @ORM\Column(type="string", nullable=true)
  27. *
  28. * @Expose
  29. * @Groups({"objective_target_score"})
  30. */
  31. private ?string $label = null;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=ObjectiveTarget::class, inversedBy="objectiveTargetScores")
  34. * @ORM\JoinColumn(nullable=false)
  35. *
  36. * @Expose
  37. * @Groups({"objective_target_score"})
  38. */
  39. private ?ObjectiveTarget $objectiveTarget = null;
  40. /**
  41. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="objectiveTargetScores")
  42. * @ORM\JoinColumn(nullable=false)
  43. *
  44. * @Expose
  45. * @Groups({"objective_target_score"})
  46. */
  47. private ?User $user = null;
  48. /**
  49. * @ORM\Column(type="float")
  50. *
  51. * @Expose
  52. * @Groups({"objective_target_score"})
  53. */
  54. private ?float $completionValue = null;
  55. /**
  56. * @ORM\ManyToOne(targetEntity=ObjectiveTargetStep::class, inversedBy="objectiveTargetScores")
  57. *
  58. * @Expose
  59. * @Groups({"objective_target_score"})
  60. */
  61. private ?ObjectiveTargetStep $objectiveTargetStep = null;
  62. use DateTrait;
  63. public function __construct()
  64. {
  65. }
  66. public function getId(): ?int
  67. {
  68. return $this->id;
  69. }
  70. public function getLabel(): ?string
  71. {
  72. return $this->label;
  73. }
  74. public function setLabel(string $label): self
  75. {
  76. $this->label = $label;
  77. return $this;
  78. }
  79. public function getObjectiveTarget(): ?ObjectiveTarget
  80. {
  81. return $this->objectiveTarget;
  82. }
  83. public function setObjectiveTarget(?ObjectiveTarget $objectiveTarget): self
  84. {
  85. $this->objectiveTarget = $objectiveTarget;
  86. return $this;
  87. }
  88. public function getUser(): ?User
  89. {
  90. return $this->user;
  91. }
  92. public function setUser(?User $user): self
  93. {
  94. $this->user = $user;
  95. return $this;
  96. }
  97. public function getCompletionValue(): ?float
  98. {
  99. return $this->completionValue;
  100. }
  101. public function setCompletionValue(float $completionValue): self
  102. {
  103. $this->completionValue = $completionValue;
  104. return $this;
  105. }
  106. public function getObjectiveTargetStep(): ?ObjectiveTargetStep
  107. {
  108. return $this->objectiveTargetStep;
  109. }
  110. public function setObjectiveTargetStep(?ObjectiveTargetStep $objectiveTargetStep): self
  111. {
  112. $this->objectiveTargetStep = $objectiveTargetStep;
  113. return $this;
  114. }
  115. }