<?php
namespace App\Entity;
use App\Traits\CommonTrt;
use Doctrine\ORM\Mapping as ORM;
//use App\Repository\ConsultationRepository;
use Symfony\Component\Validator\Constraints\Type;
/**
* @ORM\Entity(repositoryClass=AboutRepository::class)
*/
use Symfony\Component\Validator\Constraints as Assert;
class Volunteers
{
use CommonTrt;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=false)
* @Assert\NotBlank()
* @Assert\Length(min=2, max=50)
*/
private $firstName;
/**
* @ORM\Column(type="string", length=255, nullable=false)
* @Assert\NotBlank()
* @Assert\Length(min=2, max=50)
*/
private $lastName;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
* @Assert\Email()
* @Assert\NotBlank()
*/
private $email;
// /**
// * @Assert\NotBlank()
// * @Assert\Length(min=5, max=100)
// */
// private $address;
// /**
// * @Assert\NotBlank()
// * @Assert\Length(min=5, max=100)
// */
// private $findUs;
/**
* @ORM\Column(type="string")
*/
private $brochureFilename;
// /**
// * @Assert\NotBlank()
// * @Assert\Length(min=10)
// */
// private $description;
//
// /**
// * @ORM\Column(type="datetime")
// * @Assert\Type("\DateTimeInterface")(message="Attention, la date de début du volontariat doit être au bon format !")
// * @Assert\GreaterThan("today", message="La date de fin doit être ultérieure à la date d'aujourd'hui !", groups={"front"})
// */
// private $startDate;
//
// /**
// * @ORM\Column(type="datetime")
// * @Assert\Type("\DateTimeInterface")(message="Attention, la date de début du volontariat doit être au bon format !")
// * @Assert\GreaterThan(propertyPath="startDate", message="La date de départ doit être plus éloignée que la date d'arrivée !")
// */
// private $endDate;
/**
* @ORM\ManyToOne(targetEntity=Countries::class, inversedBy="volunteers")
*/
private $country;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $level;
public function getId(): ?int
{
return $this->id;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getPhone(): ?int
{
return $this->phone;
}
public function setPhone(int $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
// public function getAddress(): ?string
// {
// return $this->address;
// }
// public function setAddress(string $address): self
// {
// $this->address = $address;
// return $this;
// }
// public function getFindUs(): ?string
// {
// return $this->findUs;
// }
// public function setFindUs(?string $findUs): self
// {
// $this->findUs = $findUs;
// return $this;
// }
// public function getDescription(): ?string
// {
// return $this->description;
// }
// public function setDescription(string $description): self
// {
// $this->description = $description;
// return $this;
// }
// public function getStartDate(): ?\DateTimeInterface
// {
// return $this->startDate;
// }
//
// public function setStartDate(\DateTimeInterface $startDate): self
// {
// $this->startDate = $startDate;
//
// return $this;
// }
//
// public function getEndDate(): ?\DateTimeInterface
// {
// return $this->endDate;
// }
//
// public function setEndDate(\DateTimeInterface $endDate): self
// {
// $this->endDate = $endDate;
//
// return $this;
// }
public function getCountry(): ?Countries
{
return $this->country;
}
public function setCountry(?Countries $country): self
{
$this->country = $country;
return $this;
}
public function getBrochureFilename()
{
return $this->brochureFilename;
}
public function setBrochureFilename($brochureFilename)
{
$this->brochureFilename = $brochureFilename;
return $this;
}
public function getFullName()
{
return $this->getFirstName() . ' ' . $this->getLastName();
}
public function __toString()
{
return $this->name;
}
public function getLevel(): ?string
{
return $this->level;
}
public function setLevel(?string $level): self
{
$this->level = $level;
return $this;
}
}