src/Entity/Volunteers.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Traits\CommonTrt;
  4. use Doctrine\ORM\Mapping as ORM;
  5. //use App\Repository\ConsultationRepository;
  6. use Symfony\Component\Validator\Constraints\Type;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AboutRepository::class)
  9.  */
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. class Volunteers
  12. {
  13.     use CommonTrt;
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=false)
  22.      * @Assert\NotBlank()
  23.      * @Assert\Length(min=2, max=50)
  24.      */
  25.     private $firstName;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=false)
  28.      * @Assert\NotBlank()
  29.      * @Assert\Length(min=2, max=50)
  30.      */
  31.     private $lastName;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      * @Assert\NotBlank()
  35.      */
  36.     private $phone;
  37.     /**
  38.      * @ORM\Column(type="string", length=255)
  39.      * @Assert\Email()
  40.      * @Assert\NotBlank()
  41.      */
  42.     private $email;
  43.     // /**
  44.     //  * @Assert\NotBlank()
  45.     //  * @Assert\Length(min=5, max=100)
  46.     //  */
  47.     // private $address;
  48.     // /**
  49.     //  * @Assert\NotBlank()
  50.     //  * @Assert\Length(min=5, max=100)
  51.     //  */
  52.     // private $findUs;
  53.     /**
  54.      * @ORM\Column(type="string")
  55.      */
  56.     private $brochureFilename;
  57.     // /**
  58.     //  * @Assert\NotBlank()
  59.     //  * @Assert\Length(min=10)
  60.     //  */
  61.     // private $description;
  62. //
  63. //    /**
  64. //     * @ORM\Column(type="datetime")
  65. //     * @Assert\Type("\DateTimeInterface")(message="Attention, la date de début du volontariat doit être au bon format !")
  66. //     * @Assert\GreaterThan("today", message="La date de fin doit être ultérieure à la date d'aujourd'hui !", groups={"front"})
  67. //     */
  68. //    private $startDate;
  69. //
  70. //    /**
  71. //     * @ORM\Column(type="datetime")
  72. //     * @Assert\Type("\DateTimeInterface")(message="Attention, la date de début du volontariat doit être au bon format !")
  73. //     * @Assert\GreaterThan(propertyPath="startDate", message="La date de départ doit être plus éloignée que la date d'arrivée !")
  74. //     */
  75. //    private $endDate;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity=Countries::class, inversedBy="volunteers")
  78.      */
  79.     private $country;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $level;
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getFirstName(): ?string
  89.     {
  90.         return $this->firstName;
  91.     }
  92.     public function setFirstName(string $firstName): self
  93.     {
  94.         $this->firstName $firstName;
  95.         return $this;
  96.     }
  97.     public function getLastName(): ?string
  98.     {
  99.         return $this->lastName;
  100.     }
  101.     public function setLastName(string $lastName): self
  102.     {
  103.         $this->lastName $lastName;
  104.         return $this;
  105.     }
  106.     public function getPhone(): ?int
  107.     {
  108.         return $this->phone;
  109.     }
  110.     public function setPhone(int $phone): self
  111.     {
  112.         $this->phone $phone;
  113.         return $this;
  114.     }
  115.     public function getEmail(): ?string
  116.     {
  117.         return $this->email;
  118.     }
  119.     public function setEmail(string $email): self
  120.     {
  121.         $this->email $email;
  122.         return $this;
  123.     }
  124.     // public function getAddress(): ?string
  125.     // {
  126.     //     return $this->address;
  127.     // }
  128.     // public function setAddress(string $address): self
  129.     // {
  130.     //     $this->address = $address;
  131.     //     return $this;
  132.     // }
  133.     // public function getFindUs(): ?string
  134.     // {
  135.     //     return $this->findUs;
  136.     // }
  137.     // public function setFindUs(?string $findUs): self
  138.     // {
  139.     //     $this->findUs = $findUs;
  140.     //     return $this;
  141.     // }
  142.     // public function getDescription(): ?string
  143.     // {
  144.     //     return $this->description;
  145.     // }
  146.     // public function setDescription(string $description): self
  147.     // {
  148.     //     $this->description = $description;
  149.     //     return $this;
  150.     // }
  151. //    public function getStartDate(): ?\DateTimeInterface
  152. //    {
  153. //        return $this->startDate;
  154. //    }
  155. //
  156. //    public function setStartDate(\DateTimeInterface $startDate): self
  157. //    {
  158. //        $this->startDate = $startDate;
  159. //
  160. //        return $this;
  161. //    }
  162. //
  163. //    public function getEndDate(): ?\DateTimeInterface
  164. //    {
  165. //        return $this->endDate;
  166. //    }
  167. //
  168. //    public function setEndDate(\DateTimeInterface $endDate): self
  169. //    {
  170. //        $this->endDate = $endDate;
  171. //
  172. //        return $this;
  173. //    }
  174.     public function getCountry(): ?Countries
  175.     {
  176.         return $this->country;
  177.     }
  178.     public function setCountry(?Countries $country): self
  179.     {
  180.         $this->country $country;
  181.         return $this;
  182.     }
  183.     public function getBrochureFilename()
  184.     {
  185.         return $this->brochureFilename;
  186.     }
  187.     public function setBrochureFilename($brochureFilename)
  188.     {
  189.         $this->brochureFilename $brochureFilename;
  190.         return $this;
  191.     }
  192.     public function getFullName()
  193.     {
  194.         return $this->getFirstName() . ' ' $this->getLastName();
  195.     }
  196.     public function __toString()
  197.     {
  198.         return $this->name;
  199.     }
  200.     public function getLevel(): ?string
  201.     {
  202.         return $this->level;
  203.     }
  204.     public function setLevel(?string $level): self
  205.     {
  206.         $this->level $level;
  207.         return $this;
  208.     }
  209. }