<?php
namespace App\Entity;
use App\Repository\CBRCUserDescriptionRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass=CBRCUserDescriptionRepository::class)
* @Vich\Uploadable
*/
class CBRCUserDescription
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $forname;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $biography;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phonenumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $image1;
/**
* @ORM\Column(type="datetime", nullable=true)
* @var \DateTime
*/
private $updatedAt;
/**
* @Vich\UploadableField(mapping="user_images", fileNameProperty="image1")
* @var File
*/
private $image1File;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getForname(): ?string
{
return $this->forname;
}
public function setForname(?string $forname): self
{
$this->forname = $forname;
return $this;
}
public function getBiography(): ?string
{
return $this->biography;
}
public function setBiography(?string $biography): self
{
$this->biography = $biography;
return $this;
}
public function getPhonenumber(): ?string
{
return $this->phonenumber;
}
public function setPhonenumber(?string $phonenumber): self
{
$this->phonenumber = $phonenumber;
return $this;
}
public function getImage1(): ?string
{
return $this->image1;
}
public function setImage1(?string $image1): self
{
$this->image1 = $image1;
return $this;
}
public function setImage1File(File $image = null)
{
$this->image1File = $image;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($image) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getImage1File()
{
return $this->image1File;
}
}