<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\BFDescriptionChallengeRepository")
* @Vich\Uploadable
*/
class BFDescriptionChallenge extends AbstractArrayAccess
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\OneToOne(targetEntity="App\Entity\BFChallenge", mappedBy="description", cascade={"persist", "remove"})
*/
private $challenge;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $longdescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $image1;
/**
* @Vich\UploadableField(mapping="edition_images", fileNameProperty="image1")
* @var File
*/
private $image1File;
/**
* @ORM\Column(type="datetime", nullable=true)
* @var \DateTime
*/
private $updatedAt1;
public function getId(): ?int
{
return $this->id;
}
public function getChallenge(): ?BFChallenge
{
return $this->challenge;
}
public function setChallenge(BFChallenge $challenge): self
{
$this->challenge = $challenge;
return $this;
}
public function getLongdescription(): ?string
{
return $this->longdescription;
}
public function setLongdescription(?string $longdescription): self
{
$this->longdescription = $longdescription;
return $this;
}
public function getTextlabel(): ?string
{
return $this->textlabel;
}
public function setTextlabel(string $textlabel): self
{
$this->textlabel = $textlabel;
return $this;
}
public function getLabelcolor(): ?string
{
return $this->labelcolor;
}
public function setLabelcolor(string $labelcolor): self
{
$this->labelcolor = $labelcolor;
return $this;
}
public function setImage1File(File $image = null)
{
$this->image1File = $image;
if ($image) {
$this->updatedAt1 = new \DateTime('now');
}
}
public function getImage1File()
{
return $this->image1File;
}
public function setImage1($image)
{
$this->image1 = $image;
}
public function getImage1()
{
return $this->image1;
}
}