CustomNotation.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. namespace AppBundle\Entity\Education;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Dunglas\ApiBundle\Annotation\Iri;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use AppBundle\Entity\Traits\TimestampableEntity;
  8. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  9. /**
  10. * Notation custom pour un critère donnée pour une évaluation
  11. *
  12. * @Iri("http://schema.org/EducationNotation")
  13. */
  14. #[ORM\Entity]
  15. class CustomNotation
  16. {
  17. use TimestampableEntity;
  18. use CreatorUpdaterEntity;
  19. /**
  20. * @var int
  21. */
  22. #[ORM\Column(type: 'integer')]
  23. #[ORM\Id]
  24. #[ORM\GeneratedValue(strategy: 'AUTO')]
  25. #[Groups(['customnotation', 'criterianotation_reference'])]
  26. private $id;
  27. /**
  28. * @var CriteriaNotation
  29. */
  30. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\CriteriaNotation', inversedBy: 'customNotation')]
  31. #[Groups(['customnotation'])]
  32. private $criteriaNotation;
  33. /**
  34. * @var string
  35. */
  36. #[ORM\Column(type: 'string')]
  37. #[Assert\Type(type: 'string')]
  38. #[Assert\NotNull]
  39. #[Groups(['customnotation', 'criterianotation_reference_customnotation'])]
  40. private $label;
  41. public function __construct() {
  42. }
  43. /**
  44. * Sets id.
  45. *
  46. * @param int $id
  47. *
  48. * @return $this
  49. */
  50. public function setId($id)
  51. {
  52. $this->id = $id;
  53. return $this;
  54. }
  55. /**
  56. * Gets id.
  57. *
  58. * @return int
  59. */
  60. public function getId()
  61. {
  62. return $this->id;
  63. }
  64. /**
  65. * Sets criteriaNotation.
  66. *
  67. * @param CriteriaNotation $criteriaNotation
  68. *
  69. * @return $this
  70. */
  71. public function setCriteriaNotation($criteriaNotation)
  72. {
  73. $this->criteriaNotation = $criteriaNotation;
  74. return $this;
  75. }
  76. /**
  77. * Gets criteriaNotation.
  78. *
  79. * @return CriteriaNotation
  80. */
  81. public function getCriteriaNotation()
  82. {
  83. return $this->criteriaNotation;
  84. }
  85. /**
  86. * Sets label.
  87. *
  88. * @param string $label
  89. *
  90. * @return $this
  91. */
  92. public function setLabel($label)
  93. {
  94. $this->label = $label;
  95. return $this;
  96. }
  97. /**
  98. * Gets label.
  99. *
  100. * @return string
  101. */
  102. public function getLabel()
  103. {
  104. return $this->label;
  105. }
  106. }