src/Entity/StaffTraining.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StaffTrainingRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. #[ORM\Entity(repositoryClassStaffTrainingRepository::class), ORM\Table(name'staff_trainings')]
  8. class StaffTraining
  9. {
  10.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length100), Assert\NotBlank]
  13.     private $name;
  14.     #[ORM\Column(type'string'length100), Assert\NotBlank]
  15.     private $duration;
  16.     #[ORM\Column(type'date'), Assert\NotBlank]
  17.     private $startDate;
  18.     #[ORM\Column(type'string'length255), Assert\NotBlank]
  19.     private $place;
  20.     #[ORM\Column(type'string'length100)]
  21.     private $trainingDoc;
  22.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  23.     private $createdAt;
  24.     #[Gedmo\Timestampable(on'update'), ORM\Column(type'datetime')]
  25.     private $updatedAt;
  26.     #[ORM\ManyToOne(targetEntityStaffProfile::class, inversedBy'trainings'), ORM\JoinColumn(nullablefalse)]
  27.     private $profile;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getName(): ?string
  33.     {
  34.         return $this->name;
  35.     }
  36.     public function setName(string $name): self
  37.     {
  38.         $this->name strip_tags($name);
  39.         return $this;
  40.     }
  41.     public function getDuration(): ?string
  42.     {
  43.         return $this->duration;
  44.     }
  45.     public function setDuration(string $duration): self
  46.     {
  47.         $this->duration strip_tags($duration);
  48.         return $this;
  49.     }
  50.     public function getStartDate(): ?\DateTimeInterface
  51.     {
  52.         return $this->startDate;
  53.     }
  54.     public function setStartDate(\DateTimeInterface $startDate): self
  55.     {
  56.         $this->startDate $startDate;
  57.         return $this;
  58.     }
  59.     public function getPlace(): ?string
  60.     {
  61.         return $this->place;
  62.     }
  63.     public function setPlace(string $place): self
  64.     {
  65.         $this->place strip_tags($place);
  66.         return $this;
  67.     }
  68.     public function getTrainingDoc(): ?string
  69.     {
  70.         return $this->trainingDoc;
  71.     }
  72.     public function setTrainingDoc(string $trainingDoc): self
  73.     {
  74.         $this->trainingDoc $trainingDoc;
  75.         return $this;
  76.     }
  77.     public function getCreatedAt(): ?\DateTimeInterface
  78.     {
  79.         return $this->createdAt;
  80.     }
  81.     public function getUpdatedAt(): ?\DateTimeInterface
  82.     {
  83.         return $this->updatedAt;
  84.     }
  85.     public function getProfile(): ?StaffProfile
  86.     {
  87.         return $this->profile;
  88.     }
  89.     public function setProfile(?StaffProfile $profile): self
  90.     {
  91.         $this->profile $profile;
  92.         return $this;
  93.     }
  94. }