<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* Pages
*
* @ORM\Table(name="Members")
* @ORM\Entity(repositoryClass="App\Repository\MembersRepository")
*/
class Members
{
public function __construct(){
$this->date = new \DateTime;
$this->commissions = new ArrayCollection();
}
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="fname", type="string", length=255,nullable=true)
*/
private $fName;
/**
* @ORM\Column(name="lname", type="string", length=255,nullable=true)
*/
private $lName;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Picture", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
*/
private $picture;
/**
* @var \DateTime|null
*
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Users")
* @ORM\JoinColumn(name="createdBy",nullable=true)
*/
private $createdBy;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Users")
* @ORM\JoinColumn(name="updatedBy",nullable=true)
*/
private $updatedBy;
/**
* @var bool
*
* @ORM\Column(name="isEnabled", type="boolean",nullable=true)
*/
private $isEnabled;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $profession;
public function getId(): ?int
{
return $this->id;
}
public function getFName(): ?string
{
return $this->fName;
}
public function setFName(?string $fName): self
{
$this->fName = $fName;
return $this;
}
public function getLName(): ?string
{
return $this->lName;
}
public function setLName(?string $lName): self
{
$this->lName = $lName;
return $this;
}
public function getLastUpdate(): ?\DateTimeInterface
{
return $this->lastUpdate;
}
public function setLastUpdate(\DateTimeInterface $lastUpdate): self
{
$this->lastUpdate = $lastUpdate;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getCreatedBy(): ?Users
{
return $this->createdBy;
}
public function setCreatedBy(?Users $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getUpdatedBy(): ?Users
{
return $this->updatedBy;
}
public function setUpdatedBy(?Users $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getIsEnabled(): ?bool
{
return $this->isEnabled;
}
public function setIsEnabled(?bool $isEnabled): self
{
$this->isEnabled = $isEnabled;
return $this;
}
public function getPicture(): ?Picture
{
return $this->picture;
}
public function setPicture(?Picture $picture): self
{
if($picture->getTarget()){
$this->picture = $picture;
$this->picture->setDir('upload/images/members');
$this->picture->setThumbnailDir('upload/thumbnails/members');
}
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getName(){return $this->fName.' '.$this->lName;}
public function __toString(){return $this->getName();}
public function getProfession(): ?string
{
return $this->profession;
}
public function setProfession(?string $profession): self
{
$this->profession = $profession;
return $this;
}
}