<?phpnamespace App\Entity\Training;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\Training\PlanlineRepository;use App\Traits\Actions;use App\Entity\Training\Module;use App\Entity\Training\Planning;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PlanlineRepository::class)]#[ORM\Table(name: 'hs_tc_training_planline')]#[ApiResource]class Planline implements \Stringable{ use Actions; #[ORM\ManyToOne(targetEntity: "Planning", inversedBy: "planlines")] #[ORM\JoinColumn(nullable: true)] private Planning $planning; #[ORM\ManyToOne(targetEntity: "Module")] #[ORM\JoinColumn(nullable: true)] private Module $module; #[ORM\Column(name: "hourly", type: "string", length: 255, nullable: true)] private string $hourly; #[ORM\Column(name: "term", type: "string", length: 255, nullable: true)] private string $term; #[ORM\Column(name: "take_at", type: "datetime", nullable: true)] private \DateTime $takeAt; public function __construct() { // date_default_timezone_set('Africa/Casablanca'); $this->createAt=new \DateTime('now'); $this->published=true; } /** * @return Planning */ public function getPlanning(): ?Planning { return $this->planning; } /** * @param Planning $planning */ public function setPlanning(?Planning $planning): Planline { $this->planning = $planning; return $this; } /** * @return Module */ public function getModule(): ?Module { return $this->module; } /** * @param Module $module */ public function setModule(?Module $module): Planline { $this->module = $module; return $this; } /** * @return string */ public function getEvent(): ?string { return $this->event; } /** * @param string $event */ public function setEvent(?string $event): Planline { $this->event = $event; return $this; } /** * @return \DateTime */ public function getTakeAt(): ?\DateTime { return $this->takeAt; } /** * @param \DateTime $takeAt */ public function setTakeAt(?\DateTime $takeAt): Planline { $this->takeAt = $takeAt; return $this; } /** * @return string */ public function getHourly(): ?string { return $this->hourly; } /** * @param string $hourly */ public function setHourly(?string $hourly): Planline { $this->hourly = $hourly; return $this; } /** * @return string */ public function getTerm(): ?string { return $this->term; } /** * @param string $term */ public function setTerm(?string $term): Planline { $this->term = $term; return $this; } public function __toString(): string { return $this->module.' '.$this->planning; }}