<?php
namespace Globals\ClaimManagementBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Globals\ResourceManagementBundle\Entity\Resource;
use Symfony\Component\Validator\Constraints as Assert;
/**
* DiaryEntry
*
* @ORM\Table(name="diary_entry")
* @ORM\Entity(repositoryClass="Globals\ClaimManagementBundle\Repository\DiaryEntryRepository")
*/
class DiaryEntry
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @Assert\NotBlank
*
* @ORM\Column(name="description", type="text")
*/
private $description;
/**
* @var \DateTime
*
* @ORM\Column(name="dateCreated", type="datetime")
*/
private $dateCreated;
/**
* @var \DateTime
*
* @Assert\GreaterThanOrEqual("today")
* @Assert\NotBlank
*
* @ORM\Column(name="dueDate", type="date")
*/
private $dueDate;
/**
* @var int
*
* @Assert\NotBlank
*
* @ORM\Column(name="priority", type="integer")
*/
private $priority;
/**
* @var int
*
* @ORM\Column(name="status", type="integer")
*/
private $status;
/**
* @var Resource
*
* @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
*/
private $author;
/**
* @var Resource
*
* @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
*/
private $resource;
/**
* @var DiaryEntryType
*
* @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\DiaryEntryType")
*/
private $diaryType;
/**
* @var ArrayCollection|DiaryOtherResource[]
*
* @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\DiaryOtherResource", mappedBy="diaryEntry")
*/
private $otherDiaryResources;
/**
* @var Claim
*
* @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\Claim")
*/
private $claim;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return Claim
*/
public function getClaim()
{
return $this->claim;
}
/**
* @param Claim $claim
*/
public function setClaim($claim)
{
$this->claim = $claim;
}
/**
* @return Resource
*/
public function getAuthor()
{
return $this->author;
}
/**
* @param Resource $author
*/
public function setAuthor($author)
{
$this->author = $author;
}
/**
* @return Resource
*/
public function getResource()
{
return $this->resource;
}
/**
* @param Resource $resource
*/
public function setResource($resource)
{
$this->resource = $resource;
}
/**
* @return DiaryEntryType
*/
public function getDiaryType()
{
return $this->diaryType;
}
/**
* @param DiaryEntryType $diaryType
*/
public function setDiaryType($diaryType)
{
$this->diaryType = $diaryType;
}
/**
* Set description
*
* @param string $description
*
* @return DiaryEntry
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set dateCreated
*
* @param \DateTime $dateCreated
*
* @return DiaryEntry
*/
public function setDateCreated($dateCreated)
{
$this->dateCreated = $dateCreated;
return $this;
}
/**
* Get dateCreated
*
* @return \DateTime
*/
public function getDateCreated()
{
return $this->dateCreated;
}
/**
* Set dueDate
*
* @param \DateTime $dueDate
*
* @return DiaryEntry
*/
public function setDueDate($dueDate)
{
$this->dueDate = $dueDate;
return $this;
}
/**
* Get dueDate
*
* @return \DateTime
*/
public function getDueDate()
{
return $this->dueDate;
}
/**
* Set priority
*
* @param integer $priority
*
* @return DiaryEntry
*/
public function setPriority($priority)
{
$this->priority = $priority;
return $this;
}
/**
* Get priority
*
* @return int
*/
public function getPriority()
{
return $this->priority;
}
/**
* Set status
*
* @param integer $status
*
* @return DiaryEntry
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return int
*/
public function getStatus()
{
return $this->status;
}
public function __toString()
{
return $this->getDescription();
}
}