<?phpnamespace App\Entity\Training;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\Training\NstiRepository;use App\Traits\Actions;use App\Entity\Training\Creval;use App\Entity\Training\Trainee;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: NstiRepository::class)]#[ORM\Table(name: 'hs_tc_training_nsti')]#[ApiResource]class Nsti{ use Actions; #[ORM\Column(name: "jury", type: "string", length: 255, nullable: true)] private ?string $jury = null; #[ORM\ManyToOne(targetEntity: "Creval", inversedBy: "nstis")] #[ORM\JoinColumn(nullable: false)] private ?Creval $creval = null; #[ORM\ManyToOne(targetEntity: "Trainee", inversedBy: "nstis")] #[ORM\JoinColumn(nullable: false)] private ?Trainee $trainee = null; #[ORM\Column(name: "val", type: "float", nullable: true)] private ?float $val = null; /** * Nsti constructor. */ public function __construct() { // date_default_timezone_set('Africa/Casablanca'); $this->createAt=new \DateTime('now'); $this->published=false; } /** * @return string */ public function getJury(): ?string { return $this->jury; } /** * @param string $jury */ public function setJury(?string $jury): Nsti { $this->jury = $jury; return $this; } /** * @return Creval */ public function getCreval(): ?Creval { return $this->creval; } /** * @param Creval $creval */ public function setCreval(?Creval $creval): Nsti { $this->creval = $creval; return $this; } /** * @return Trainee */ public function getTrainee(): ?Trainee { return $this->trainee; } /** * @param Trainee $trainee */ public function setTrainee(?Trainee $trainee): Nsti { $this->trainee = $trainee; return $this; } /** * @return float */ public function getVal(): ?float { return $this->val; } /** * @param float $val */ public function setVal(?float $val): Nsti { $this->val = $val; return $this; }}