src/Entity/SchoolStudentAverage.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\UserRepository;
  5. use App\Repository\SchoolStudentAverageRepository;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SchoolStudentAverageRepository::class)
  8.  */
  9. class SchoolStudentAverage
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=20, unique=true)
  19.      */
  20.     private $code;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="schoolStudentAverages")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $establishment;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=SchoolYear::class, inversedBy="schoolStudentAverages")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $schoolYear;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=SchoolYearPeriode::class, inversedBy="schoolStudentAverages")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $schoolYearPeriode;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=RegistrationStudentRegistration::class, inversedBy="schoolStudentAverages")
  38.      * @ORM\JoinColumn(nullable=false)
  39.      */
  40.     private $registrationStudentRegistration;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=SchoolMatter::class, inversedBy="schoolStudentAverages")
  43.      * @ORM\JoinColumn(nullable=false)
  44.      */
  45.     private $matter;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=SchoolSubMatter::class, inversedBy="schoolStudentAverages")
  48.      */
  49.     private $subMatter;
  50.     /**
  51.      * @ORM\Column(type="float")
  52.      */
  53.     private $note;
  54.     /**
  55.      * @ORM\Column(type="float")
  56.      */
  57.     private $note_on;
  58.     /**
  59.      * @ORM\Column(type="float")
  60.      */
  61.     private $coefficient;
  62.     /**
  63.      * @ORM\Column(type="datetime_immutable")
  64.     */
  65.     private $created_at;
  66.     /**
  67.      * @ORM\Column(type="datetime_immutable")
  68.     */
  69.     private $updated_at;
  70.     /**
  71.      * @ORM\Column(type="integer")
  72.     */
  73.     private $created_by;
  74.     /**
  75.      * @ORM\Column(type="integer")
  76.     */
  77.     private $updated_by;
  78.     /**
  79.      * @ORM\Column(type="boolean")
  80.     */
  81.     private $is_unclassified;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity=SchoolAverage::class, inversedBy="schoolStudentAverages")
  84.      * @ORM\JoinColumn(nullable=false)
  85.      */
  86.     private $schoolAverage;
  87.     /**
  88.      * @ORM\Column(type="boolean")
  89.     */
  90.     private $as_submatter;
  91.     /**
  92.      * @ORM\Column(type="boolean")
  93.      */
  94.     private $is_matter_conduct;
  95.     public function __construct()
  96.     {
  97.         $this->is_matter_conduct false;
  98.         $this->is_unclassified false;
  99.         $this->as_submatter false;
  100.         $this->note 999;
  101.     }
  102.     public function getId(): ?int
  103.     {
  104.         return $this->id;
  105.     }
  106.     public function getEstablishment(): ?Establishment
  107.     {
  108.         return $this->establishment;
  109.     }
  110.     public function setEstablishment(?Establishment $establishment): self
  111.     {
  112.         $this->establishment $establishment;
  113.         return $this;
  114.     }
  115.     public function getSchoolYear(): ?SchoolYear
  116.     {
  117.         return $this->schoolYear;
  118.     }
  119.     public function setSchoolYear(?SchoolYear $schoolYear): self
  120.     {
  121.         $this->schoolYear $schoolYear;
  122.         return $this;
  123.     }
  124.     public function getSchoolYearPeriode(): ?SchoolYearPeriode
  125.     {
  126.         return $this->schoolYearPeriode;
  127.     }
  128.     public function setSchoolYearPeriode(?SchoolYearPeriode $schoolYearPeriode): self
  129.     {
  130.         $this->schoolYearPeriode $schoolYearPeriode;
  131.         return $this;
  132.     }
  133.     public function getRegistrationStudentRegistration(): ?RegistrationStudentRegistration
  134.     {
  135.         return $this->registrationStudentRegistration;
  136.     }
  137.     public function setRegistrationStudentRegistration(?RegistrationStudentRegistration $registrationStudentRegistration): self
  138.     {
  139.         $this->registrationStudentRegistration $registrationStudentRegistration;
  140.         return $this;
  141.     }
  142.     public function getMatter(): ?SchoolMatter
  143.     {
  144.         return $this->matter;
  145.     }
  146.     public function setMatter(?SchoolMatter $matter): self
  147.     {
  148.         $this->matter $matter;
  149.         return $this;
  150.     }
  151.     public function getSubMatter(): ?SchoolSubMatter
  152.     {
  153.         return $this->subMatter;
  154.     }
  155.     public function setSubMatter(?SchoolSubMatter $subMatter): self
  156.     {
  157.         $this->subMatter $subMatter;
  158.         return $this;
  159.     }
  160.     public function getNote(): ?float
  161.     {
  162.         return $this->note;
  163.     }
  164.     public function setNote(float $note): self
  165.     {
  166.         $this->note $note;
  167.         return $this;
  168.     }
  169.     public function getNoteOn(): ?float
  170.     {
  171.         return $this->note_on;
  172.     }
  173.     public function setNoteOn(float $note_on): self
  174.     {
  175.         $this->note_on $note_on;
  176.         return $this;
  177.     }
  178.     public function getCoefficient(): ?float
  179.     {
  180.         return $this->coefficient;
  181.     }
  182.     public function setCoefficient(float $coefficient): self
  183.     {
  184.         $this->coefficient $coefficient;
  185.         return $this;
  186.     }
  187.     public function getCreatedAt(): ?\DateTimeImmutable
  188.     {
  189.         return $this->created_at;
  190.     }
  191.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  192.     {
  193.         $this->created_at $created_at;
  194.         return $this;
  195.     }
  196.     public function getUpdatedAt(): ?\DateTimeImmutable
  197.     {
  198.         return $this->updated_at;
  199.     }
  200.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  201.     {
  202.         $this->updated_at $updated_at;
  203.         return $this;
  204.     }
  205.     public function getCreatedBy(): ?int
  206.     {
  207.         return $this->created_by;
  208.     }
  209.     public function setCreatedBy(int $created_by): self
  210.     {
  211.         $this->created_by $created_by;
  212.         return $this;
  213.     }
  214.     public function getUpdatedBy(): ?int
  215.     {
  216.         return $this->updated_by;
  217.     }
  218.     public function setUpdatedBy(int $updated_by): self
  219.     {
  220.         $this->updated_by $updated_by;
  221.         return $this;
  222.     }
  223.     public function getSchoolAverage(): ?SchoolAverage
  224.     {
  225.         return $this->schoolAverage;
  226.     }
  227.     public function setSchoolAverage(?SchoolAverage $schoolAverage): self
  228.     {
  229.         $this->schoolAverage $schoolAverage;
  230.         return $this;
  231.     }
  232.     public function getCode(): ?string
  233.     {
  234.         return $this->code;
  235.     }
  236.     public function setCode(string $code): self
  237.     {
  238.         $this->code $code;
  239.         return $this;
  240.     }
  241.     public function getIsUnclassified(): ?bool
  242.     {
  243.         return $this->is_unclassified;
  244.     }
  245.     public function setIsUnclassified(bool $is_unclassified): self
  246.     {
  247.         $this->is_unclassified $is_unclassified;
  248.         return $this;
  249.     }
  250.     public function getAsSubmatter(): ?bool
  251.     {
  252.         return $this->as_submatter;
  253.     }
  254.     public function setAsSubmatter(bool $as_submatter): self
  255.     {
  256.         $this->as_submatter $as_submatter;
  257.         return $this;
  258.     }
  259.     public function getIsMatterConduct(): ?bool
  260.     {
  261.         return $this->is_matter_conduct;
  262.     }
  263.     public function setIsMatterConduct(bool $is_matter_conduct): self
  264.     {
  265.         $this->is_matter_conduct $is_matter_conduct;
  266.         return $this;
  267.     }
  268.     public function getUserUpdatedBy(UserRepository $userRepository){
  269.         return $userRepository->findOneBy(['id' => $this->getUpdatedBy()], []);
  270.     }
  271. }