<?php
namespace App\Entity;
use App\Repository\StaffTrainingRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: StaffTrainingRepository::class), ORM\Table(name: 'staff_trainings')]
class StaffTraining
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $name;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $duration;
#[ORM\Column(type: 'date'), Assert\NotBlank]
private $startDate;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $place;
#[ORM\Column(type: 'string', length: 100)]
private $trainingDoc;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $updatedAt;
#[ORM\ManyToOne(targetEntity: StaffProfile::class, inversedBy: 'trainings'), ORM\JoinColumn(nullable: false)]
private $profile;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = strip_tags($name);
return $this;
}
public function getDuration(): ?string
{
return $this->duration;
}
public function setDuration(string $duration): self
{
$this->duration = strip_tags($duration);
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getPlace(): ?string
{
return $this->place;
}
public function setPlace(string $place): self
{
$this->place = strip_tags($place);
return $this;
}
public function getTrainingDoc(): ?string
{
return $this->trainingDoc;
}
public function setTrainingDoc(string $trainingDoc): self
{
$this->trainingDoc = $trainingDoc;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function getProfile(): ?StaffProfile
{
return $this->profile;
}
public function setProfile(?StaffProfile $profile): self
{
$this->profile = $profile;
return $this;
}
}