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. public const UPLOAD_COMMUNICATION_RAW_VALUE = 'upload_communication_raw_value';
  17. public const UPLOAD_COMMUNICATION_RAW_VALUE_LABEL = 'Bonus merchandising';
  18. /**
  19. * @ORM\Id
  20. * @ORM\GeneratedValue
  21. * @ORM\Column(type="integer")
  22. *
  23. * @Expose
  24. * @Groups({"objective_target_score"})
  25. */
  26. private ?int $id = null;
  27. /**
  28. * @ORM\Column(type="string", nullable=true)
  29. *
  30. * @Expose
  31. * @Groups({"objective_target_score"})
  32. */
  33. private ?string $label = null;
  34. /**
  35. * @ORM\ManyToOne(targetEntity=ObjectiveTarget::class, inversedBy="objectiveTargetScores")
  36. * @ORM\JoinColumn(nullable=false)
  37. *
  38. * @Expose
  39. * @Groups({"objective_target_score"})
  40. */
  41. private ?ObjectiveTarget $objectiveTarget = null;
  42. /**
  43. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="objectiveTargetScores")
  44. * @ORM\JoinColumn(nullable=false)
  45. *
  46. * @Expose
  47. * @Groups({"objective_target_score"})
  48. */
  49. private ?User $user = null;
  50. /**
  51. * @ORM\Column(type="float")
  52. *
  53. * @Expose
  54. * @Groups({"objective_target_score"})
  55. */
  56. private ?float $completionValue = null;
  57. /**
  58. * @ORM\ManyToOne(targetEntity=ObjectiveTargetStep::class, inversedBy="objectiveTargetScores")
  59. *
  60. * @Expose
  61. * @Groups({"objective_target_score"})
  62. */
  63. private ?ObjectiveTargetStep $objectiveTargetStep = null;
  64. /**
  65. * @ORM\Column(type="json", nullable=true)
  66. *
  67. * @Expose
  68. * @Groups({"objective_target_score"})
  69. */
  70. private ?array $rawAddedValue = null;
  71. use DateTrait;
  72. public function __construct()
  73. {
  74. }
  75. public function getId(): ?int
  76. {
  77. return $this->id;
  78. }
  79. public function getLabel(): ?string
  80. {
  81. return $this->label;
  82. }
  83. public function setLabel(string $label): self
  84. {
  85. $this->label = $label;
  86. return $this;
  87. }
  88. public function getObjectiveTarget(): ?ObjectiveTarget
  89. {
  90. return $this->objectiveTarget;
  91. }
  92. public function setObjectiveTarget(?ObjectiveTarget $objectiveTarget): self
  93. {
  94. $this->objectiveTarget = $objectiveTarget;
  95. return $this;
  96. }
  97. public function getUser(): ?User
  98. {
  99. return $this->user;
  100. }
  101. public function setUser(?User $user): self
  102. {
  103. $this->user = $user;
  104. return $this;
  105. }
  106. public function getCompletionValue(): ?float
  107. {
  108. return $this->completionValue;
  109. }
  110. public function setCompletionValue(float $completionValue): self
  111. {
  112. $this->completionValue = $completionValue;
  113. return $this;
  114. }
  115. public function getObjectiveTargetStep(): ?ObjectiveTargetStep
  116. {
  117. return $this->objectiveTargetStep;
  118. }
  119. public function setObjectiveTargetStep(?ObjectiveTargetStep $objectiveTargetStep): self
  120. {
  121. $this->objectiveTargetStep = $objectiveTargetStep;
  122. return $this;
  123. }
  124. public function getRawAddedValue(): ?array
  125. {
  126. return $this->rawAddedValue;
  127. }
  128. public function setRawAddedValue(?array $rawAddedValue): self
  129. {
  130. $this->rawAddedValue = $rawAddedValue;
  131. return $this;
  132. }
  133. }