src/Entity/Abscence.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AbscenceRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AbscenceRepository::class)
  8.  */
  9. class Abscence
  10. {
  11.     /**
  12.      * @var int
  13.      *
  14.      * @ORM\Column(name="id", type="integer")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $weight;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $reason;
  27.     /**
  28.      * Cette abscence est t-elle justifiee ?
  29.      * @ORM\Column(type="boolean", options={"default" = false})
  30.      */
  31.     private $justified false;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=AbscenceSheet::class, inversedBy="abscences")
  34.      * @ORM\JoinColumn(nullable=false)
  35.      */
  36.     private $abscenceSheet;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=Student::class)
  39.      * @ORM\JoinColumn(nullable=false)
  40.      */
  41.     private $student;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getWeight(): ?int
  47.     {
  48.         return $this->weight;
  49.     }
  50.     public function setWeight(int $weight): self
  51.     {
  52.         $this->weight $weight;
  53.         return $this;
  54.     }
  55.     public function getStudent(): ?Student
  56.     {
  57.         return $this->student;
  58.     }
  59.     public function setStudent(?Student $student): self
  60.     {
  61.         $this->student $student;
  62.         return $this;
  63.     }
  64.     public function getAbscenceSheet(): ?AbscenceSheet
  65.     {
  66.         return $this->abscenceSheet;
  67.     }
  68.     public function setAbscenceSheet(?AbscenceSheet $abscenceSheet): self
  69.     {
  70.         $this->abscenceSheet $abscenceSheet;
  71.         return $this;
  72.     }
  73.     public function getReason(): ?string
  74.     {
  75.         return $this->reason;
  76.     }
  77.     public function setReason(string $reason): static
  78.     {
  79.         $this->reason $reason;
  80.         return $this;
  81.     }
  82.     public function isJustified(): ?bool
  83.     {
  84.         return $this->justified;
  85.     }
  86.     public function setJustified(bool $justified): static
  87.     {
  88.         $this->justified $justified;
  89.         return $this;
  90.     }
  91. }