src/Entity/Training/Nsti.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Training;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\Training\NstiRepository;
  5. use App\Traits\Actions;
  6. use App\Entity\Training\Creval;
  7. use App\Entity\Training\Trainee;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassNstiRepository::class)]
  10. #[ORM\Table(name'hs_tc_training_nsti')]
  11. #[ApiResource]
  12. class Nsti
  13. {
  14.     use Actions;
  15.     #[ORM\Column(name"jury"type"string"length255nullabletrue)]
  16.     private ?string $jury null;
  17.     #[ORM\ManyToOne(targetEntity"Creval"inversedBy"nstis")]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Creval $creval null;
  20.     #[ORM\ManyToOne(targetEntity"Trainee"inversedBy"nstis")]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?Trainee $trainee null;
  23.     #[ORM\Column(name"val"type"float"nullabletrue)]
  24.     private ?float $val null;
  25.     /**
  26.      * Nsti constructor.
  27.      */
  28.     public function __construct()
  29.     {
  30.         // date_default_timezone_set('Africa/Casablanca');
  31.         $this->createAt=new \DateTime('now');
  32.         $this->published=false;
  33.     }
  34.     /**
  35.      * @return string
  36.      */
  37.     public function getJury(): ?string
  38.     {
  39.         return $this->jury;
  40.     }
  41.     /**
  42.      * @param string $jury
  43.      */
  44.     public function setJury(?string $jury): Nsti
  45.     {
  46.         $this->jury $jury;
  47.         return $this;
  48.     }
  49.     /**
  50.      * @return Creval
  51.      */
  52.     public function getCreval(): ?Creval
  53.     {
  54.         return $this->creval;
  55.     }
  56.     /**
  57.      * @param Creval $creval
  58.      */
  59.     public function setCreval(?Creval $creval): Nsti
  60.     {
  61.         $this->creval $creval;
  62.         return $this;
  63.     }
  64.     /**
  65.      * @return Trainee
  66.      */
  67.     public function getTrainee(): ?Trainee
  68.     {
  69.         return $this->trainee;
  70.     }
  71.     /**
  72.      * @param Trainee $trainee
  73.      */
  74.     public function setTrainee(?Trainee $trainee): Nsti
  75.     {
  76.         $this->trainee $trainee;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return float
  81.      */
  82.     public function getVal(): ?float
  83.     {
  84.         return $this->val;
  85.     }
  86.     /**
  87.      * @param float $val
  88.      */
  89.     public function setVal(?float $val): Nsti
  90.     {
  91.         $this->val $val;
  92.         return $this;
  93.     }
  94. }