<?php
/*
 * Developer : John D'Alto (jdalto@yahoo.com)
 * Date : 9/1/2012
 * All code (c)2012 JLS Consulting, all rights reserved
 */

namespace Dorcas\TabithaBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="Dorcas\TabithaBundle\Repository\TabithaRepository")
 * @ORM\HasLifecycleCallbacks()
 * @ORM\Table(name="notes")
 */

class Notes
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $note_id;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $client_id;
    
    /**
     * @ORM\ManyToOne(targetEntity="Client", inversedBy="notes")
     * @ORM\JoinColumn(name="client_id", referencedColumnName="client_id")
     */
    protected $client;
    
    /**
     * @ORM\Column(type="text")
     */
    protected $note;

    /**
     * @ORM\Column(type="string")
     */
    protected $user;
    
    /**
     * @ORM\Column(type="datetime")
     */
    protected $created_dt;
    
    /**
     * @ORM\Column(type="datetime")
     */
    protected $modified_dt;
    

    /**
     * Set note
     *
     * @param string $note
     */
    public function setNote($note)
    {
        $this->note = $note;
    }

    /**
     * Get note
     *
     * @return string 
     */
    public function getNote()
    {
        return $this->note;
    }

    /**
     * Set client
     *
     * @param Dorcas\TabithaBundle\Entity\Client $client
     */
    public function setClient(\Dorcas\TabithaBundle\Entity\Client $client)
    {
        $this->client = $client;
    }

    /**
     * Get client
     *
     * @return Dorcas\TabithaBundle\Entity\Client 
     */
    public function getClient()
    {
        return $this->client;
    }

    /**
     * Get note_id
     *
     * @return integer 
     */
    public function getNoteId()
    {
        return $this->note_id;
    }

    /**
     * Set client_id
     *
     * @param integer $clientId
     */
    public function setClientId($clientId)
    {
        $this->client_id = $clientId;
    }

    /**
     * Get client_id
     *
     * @return integer 
     */
    public function getClientId()
    {
        return $this->client_id;
    }

    /**
     * Set user
     *
     * @param string $user
     */
    public function setUser($user)
    {
        $this->user = $user;
    }

    /**
     * Get user
     *
     * @return string 
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Set created_dt
     *
     * @param datetime $createdDt
     */
    public function setCreatedDt($createdDt)
    {
        $this->created_dt = $createdDt;
    }

    /**
     * Get created_dt
     *
     * @return datetime 
     */
    public function getCreatedDt()
    {
        return $this->created_dt;
    }

    /**
     * Set modified_dt
     *
     * @param datetime $modifiedDt
     */
    public function setModifiedDt($modifiedDt)
    {
        $this->modified_dt = $modifiedDt;
    }

    /**
     * Get modified_dt
     *
     * @return datetime 
     */
    public function getModifiedDt()
    {
        return $this->modified_dt;
    }
    
        /**
     * @ORM\preUpdate
     */
    public function setUpdatedValue()
    {
       $this->setModifiedDt(new \DateTime());
    }

   public function __construct()
    {
        $this->setCreatedDt(new \DateTime());
        $this->setModifiedDt(new \DateTime());
    }

}