<?php
namespace App\Entity;
use App\Repository\StaffDeputationRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: StaffDeputationRepository::class), ORM\Table(name: 'staff_deputations')]
class StaffDeputation
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $place;
#[ORM\Column(type: 'string', length: 100), Assert\NotBlank]
private $period;
#[ORM\Column(type: 'string', length: 100)]
private $depOrder;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $udpatedAt;
#[ORM\ManyToOne(targetEntity: StaffProfile::class, inversedBy: 'deputations'), ORM\JoinColumn(nullable: false)]
private $profile;
public function getId(): ?int
{
return $this->id;
}
public function getPlace(): ?string
{
return $this->place;
}
public function setPlace(string $place): self
{
$this->place = strip_tags($place);
return $this;
}
public function getPeriod(): ?string
{
return $this->period;
}
public function setPeriod(string $period): self
{
$this->period = strip_tags($period);
return $this;
}
public function getDepOrder(): ?string
{
return $this->depOrder;
}
public function setDepOrder(string $depOrder): self
{
$this->depOrder = $depOrder;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUdpatedAt(): ?\DateTimeInterface
{
return $this->udpatedAt;
}
public function getProfile(): ?StaffProfile
{
return $this->profile;
}
public function setProfile(?StaffProfile $profile): self
{
$this->profile = $profile;
return $this;
}
}