src/Globals/ClaimManagementBundle/Entity/DiaryEntry.php line 16

Open in your IDE?
  1. <?php
  2. namespace Globals\ClaimManagementBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Globals\ResourceManagementBundle\Entity\Resource;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * DiaryEntry
  9.  *
  10.  * @ORM\Table(name="diary_entry")
  11.  * @ORM\Entity(repositoryClass="Globals\ClaimManagementBundle\Repository\DiaryEntryRepository")
  12.  */
  13. class DiaryEntry
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @Assert\NotBlank
  27.      *
  28.      * @ORM\Column(name="description", type="text")
  29.      */
  30.     private $description;
  31.     /**
  32.      * @var \DateTime
  33.      *
  34.      * @ORM\Column(name="dateCreated", type="datetime")
  35.      */
  36.     private $dateCreated;
  37.     /**
  38.      * @var \DateTime
  39.      *
  40.      * @Assert\GreaterThanOrEqual("today")
  41.      * @Assert\NotBlank
  42.      *
  43.      * @ORM\Column(name="dueDate", type="date")
  44.      */
  45.     private $dueDate;
  46.     /**
  47.      * @var int
  48.      *
  49.      * @Assert\NotBlank
  50.      *
  51.      * @ORM\Column(name="priority", type="integer")
  52.      */
  53.     private $priority;
  54.     /**
  55.      * @var int
  56.      *
  57.      * @ORM\Column(name="status", type="integer")
  58.      */
  59.     private $status;
  60.     /**
  61.      * @var Resource
  62.      *
  63.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
  64.      */
  65.     private $author;
  66.     /**
  67.      * @var Resource
  68.      *
  69.      * @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource")
  70.      */
  71.     private $resource;
  72.     /**
  73.      * @var DiaryEntryType
  74.      *
  75.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\DiaryEntryType")
  76.      */
  77.     private $diaryType;
  78.     /**
  79.      * @var ArrayCollection|DiaryOtherResource[]
  80.      *
  81.      * @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\DiaryOtherResource", mappedBy="diaryEntry")
  82.      */
  83.     private $otherDiaryResources;
  84.     /**
  85.      * @var Claim
  86.      *
  87.      * @ORM\ManyToOne(targetEntity="Globals\ClaimManagementBundle\Entity\Claim")
  88.      */
  89.     private $claim;
  90.     /**
  91.      * Get id
  92.      *
  93.      * @return int
  94.      */
  95.     public function getId()
  96.     {
  97.         return $this->id;
  98.     }
  99.     /**
  100.      * @return Claim
  101.      */
  102.     public function getClaim()
  103.     {
  104.         return $this->claim;
  105.     }
  106.     /**
  107.      * @param Claim $claim
  108.      */
  109.     public function setClaim($claim)
  110.     {
  111.         $this->claim $claim;
  112.     }
  113.     /**
  114.      * @return Resource
  115.      */
  116.     public function getAuthor()
  117.     {
  118.         return $this->author;
  119.     }
  120.     /**
  121.      * @param Resource $author
  122.      */
  123.     public function setAuthor($author)
  124.     {
  125.         $this->author $author;
  126.     }
  127.     /**
  128.      * @return Resource
  129.      */
  130.     public function getResource()
  131.     {
  132.         return $this->resource;
  133.     }
  134.     /**
  135.      * @param Resource $resource
  136.      */
  137.     public function setResource($resource)
  138.     {
  139.         $this->resource $resource;
  140.     }
  141.     /**
  142.      * @return DiaryEntryType
  143.      */
  144.     public function getDiaryType()
  145.     {
  146.         return $this->diaryType;
  147.     }
  148.     /**
  149.      * @param DiaryEntryType $diaryType
  150.      */
  151.     public function setDiaryType($diaryType)
  152.     {
  153.         $this->diaryType $diaryType;
  154.     }
  155.     
  156.     /**
  157.      * Set description
  158.      *
  159.      * @param string $description
  160.      *
  161.      * @return DiaryEntry
  162.      */
  163.     public function setDescription($description)
  164.     {
  165.         $this->description $description;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get description
  170.      *
  171.      * @return string
  172.      */
  173.     public function getDescription()
  174.     {
  175.         return $this->description;
  176.     }
  177.     /**
  178.      * Set dateCreated
  179.      *
  180.      * @param \DateTime $dateCreated
  181.      *
  182.      * @return DiaryEntry
  183.      */
  184.     public function setDateCreated($dateCreated)
  185.     {
  186.         $this->dateCreated $dateCreated;
  187.         return $this;
  188.     }
  189.     /**
  190.      * Get dateCreated
  191.      *
  192.      * @return \DateTime
  193.      */
  194.     public function getDateCreated()
  195.     {
  196.         return $this->dateCreated;
  197.     }
  198.     /**
  199.      * Set dueDate
  200.      *
  201.      * @param \DateTime $dueDate
  202.      *
  203.      * @return DiaryEntry
  204.      */
  205.     public function setDueDate($dueDate)
  206.     {
  207.         $this->dueDate $dueDate;
  208.         return $this;
  209.     }
  210.     /**
  211.      * Get dueDate
  212.      *
  213.      * @return \DateTime
  214.      */
  215.     public function getDueDate()
  216.     {
  217.         return $this->dueDate;
  218.     }
  219.     /**
  220.      * Set priority
  221.      *
  222.      * @param integer $priority
  223.      *
  224.      * @return DiaryEntry
  225.      */
  226.     public function setPriority($priority)
  227.     {
  228.         $this->priority $priority;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Get priority
  233.      *
  234.      * @return int
  235.      */
  236.     public function getPriority()
  237.     {
  238.         return $this->priority;
  239.     }
  240.     /**
  241.      * Set status
  242.      *
  243.      * @param integer $status
  244.      *
  245.      * @return DiaryEntry
  246.      */
  247.     public function setStatus($status)
  248.     {
  249.         $this->status $status;
  250.         return $this;
  251.     }
  252.     /**
  253.      * Get status
  254.      *
  255.      * @return int
  256.      */
  257.     public function getStatus()
  258.     {
  259.         return $this->status;
  260.     }
  261.     public function __toString()
  262.     {
  263.         return $this->getDescription();
  264.     }
  265. }