| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <?php
- namespace AppBundle\Entity\Education;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- * Configuration des critère pour la grille d'évaluation
- */
- #[ORM\Entity]
- class EducationNotationCriteriaConfig
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['educationnotationcriteriaconfig'])]
- private $id;
- /**
- * @var EducationNotationConfig
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationNotationConfig', inversedBy: 'educationNotationCriteriaConfigs')]
- #[Groups(['educationnotationcriteriaconfig', 'report_card_educationstudent'])]
- private $educationNotationConfig;
- /**
- * @var CriteriaNotation
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\CriteriaNotation', inversedBy: 'educationNotationCriteriaConfigs')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
- #[Groups(['educationnotationcriteriaconfig'])]
- private $criteriaNotation;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', options: ['default' => 1])]
- #[Assert\Range(min: 1, max: 10)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['educationnotationcriteriaconfig', 'report_card_educationstudent'])]
- private $coefficient = 1;
- /**
- * @var ArrayCollection<EducationNotation>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationNotation', mappedBy: 'criteriaNotationConfig')]
- #[Groups(['educationnotationcriteriaconfig'])]
- private $educationNotations;
- public function __construct() {
- $this->educationNotations = new ArrayCollection();
- }
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets criteriaNotation.
- *
- * @param CriteriaNotation $criteriaNotation
- *
- * @return $this
- */
- public function setCriteriaNotation($criteriaNotation)
- {
- $this->criteriaNotation = $criteriaNotation;
- return $this;
- }
- /**
- * Gets criteriaNotation.
- *
- * @return CriteriaNotation
- */
- public function getCriteriaNotation()
- {
- return $this->criteriaNotation;
- }
- /**
- * Sets educationNotationConfig.
- *
- * @param EducationNotationConfig $educationNotationConfig
- *
- * @return $this
- */
- public function setEducationNotationConfig($educationNotationConfig)
- {
- $this->educationNotationConfig = $educationNotationConfig;
- return $this;
- }
- /**
- * Gets criteriaNotation.
- *
- * @return EducationNotationConfig
- */
- public function getEducationNotationConfig()
- {
- return $this->educationNotationConfig;
- }
- /**
- * Sets label.
- *
- * @param string $label
- *
- * @return $this
- */
- public function setLabel($label)
- {
- $this->label = $label;
- return $this;
- }
- /**
- * Gets label.
- *
- * @return string
- */
- public function getLabel()
- {
- return $this->label;
- }
- /**
- * Sets coefficient.
- *
- * @param int $coefficient
- *
- * @return $this
- */
- public function setCoefficient($coefficient)
- {
- if($coefficient === null) $coefficient = 1;
- $this->coefficient = $coefficient;
- return $this;
- }
- /**
- * Gets coefficient.
- *
- * @return int
- */
- public function getCoefficient()
- {
- return $this->coefficient;
- }
- /**
- * Add educationNotation
- *
- * @param \AppBundle\Entity\Education\EducationNotation $educationNotation
- *
- * @return EducationNotationCriteriaConfig
- */
- public function addEducationNotation(\AppBundle\Entity\Education\EducationNotation $educationNotation)
- {
- $this->educationNotations[] = $educationNotation;
- return $this;
- }
- /**
- * Remove educationNotation
- *
- * @param \AppBundle\Entity\Education\EducationNotation $educationNotation
- */
- public function removeEducationNotation(\AppBundle\Entity\Education\EducationNotation $educationNotation)
- {
- $this->educationNotations->removeElement($educationNotation);
- }
- /**
- * Get educationNotations
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEducationNotations()
- {
- return $this->educationNotations;
- }
- }
|