src/Entity/Projects.php line 13
<?php
namespace App\Entity;
use App\Repository\ProjectsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProjectsRepository::class)
*/
class Projects
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $place;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $details;
/**
* @ORM\OneToOne(targetEntity=Albums::class, cascade={"persist", "remove"})
*/
private $album;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $user;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @var \DateTime
*
* @ORM\Column(name="lastUpdate", type="datetime", nullable=true)
*/
private $lastUpdate;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Users")
* @ORM\JoinColumn(name="updatedBy",nullable=true)
*/
private $updatedBy;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $slug;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isEnabled;
/**
* @ORM\OneToOne(targetEntity=Picture::class, cascade={"persist", "remove"})
*/
private $banner;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $startingDate;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $endDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $runtime;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cost;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $startDate;
/**
* @ORM\OneToOne(targetEntity="App\Entity\File", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
*/
private $document;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $status;
public function __construct()
{
$this->othersStructures = new ArrayCollection();
}
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 getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getOwner(): ?string
{
return $this->owner;
}
public function setOwner(?string $owner): self
{
$this->owner = $owner;
return $this;
}
public function getPlace(): ?string
{
return $this->place;
}
public function setPlace(?string $place): self
{
$this->place = $place;
return $this;
}
public function getDetails(): ?string
{
return $this->details;
}
public function setDetails(?string $details): self
{
$this->details = $details;
return $this;
}
public function getAlbum(): ?Albums
{
return $this->album;
}
public function setAlbum(?Albums $album): self
{
$this->album = $album;
return $this;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): self
{
$this->user = $user;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getLastUpdate(): ?\DateTimeInterface
{
return $this->lastUpdate;
}
public function setLastUpdate(\DateTimeInterface $lastUpdate): self
{
$this->lastUpdate = $lastUpdate;
return $this;
}
public function getUpdatedBy(): ?Users
{
return $this->updatedBy;
}
public function setUpdatedBy(?Users $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getIsEnabled(): ?bool
{
return $this->isEnabled;
}
public function setIsEnabled(?bool $isEnabled): self
{
$this->isEnabled = $isEnabled;
return $this;
}
public function getBanner(): ?Picture
{
return $this->banner;
}
public function setBanner(?Picture $banner): self
{
if($banner->getTarget()){
$this->banner = $banner;
$this->banner->setDir('upload/images/projects/');
$this->banner->setThumbnailDir('upload/thumbnails/projects/');
}
return $this;
}
public function getStartingDate(): ?\DateTimeInterface
{
return $this->startingDate;
}
public function setStartingDate(?\DateTimeInterface $startingDate): self
{
$this->startingDate = $startingDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(?\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getRuntime(): ?string
{
return $this->runtime;
}
public function setRuntime(?string $runtime): self
{
$this->runtime = $runtime;
return $this;
}
public function getCost(): ?string
{
return $this->cost;
}
public function setCost(?string $cost): self
{
$this->cost = $cost;
return $this;
}
public function getStartDate(): ?string
{
return $this->startDate;
}
public function setStartDate(?string $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getDocument(): ?File
{
return $this->document;
}
public function setDocument(?File $document): self
{
if($document->getTarget()){
$this->document = $document;
$this->document->setDir('upload/files/projects');
}
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
}