<?php

namespace RxConnexionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use RxConnexionBundle\Entity\Base\BaseEntity;
use JMS\Serializer\Annotation\MaxDepth;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\ReminderTypeRepository")
 * @ORM\Table(name="reminder_type")
 */

class ReminderTypeEntity extends BaseEntity
{

    /**
     * @ORM\Column(name="is_deleted", type="boolean")
     */
    protected $isDeleted;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $code;

    /**
     * @ORM\Column(type="string")
     */
    protected $description;

    /**
     * @ORM\OneToMany(targetEntity="AccountUserReminderEntity", mappedBy="reminderType")
     */
    protected $accountUserReminders;


    public function __construct()
    {
    }

    /**
     * Set createdAt
     *
     * @ORM\PrePersist
     */
    public function setCreatedAtValue()
    {
        parent::setCreatedAtValue();
        $this->isDeleted = 0;
    }


    /*--------------------------------------------------------------------------------------------------------*/
    /*					User Defined Setters and Getters													  */
    /*--------------------------------------------------------------------------------------------------------*/


    /*--------------------------------------------------------------------------------------------------------*/
    /*					Setters and Getters																	  */
    /*--------------------------------------------------------------------------------------------------------*/



    /**
     * Set isDeleted
     *
     * @param boolean $isDeleted
     *
     * @return ReminderType
     */
    public function setIsDeleted($isDeleted)
    {
        $this->isDeleted = $isDeleted;

        return $this;
    }

    /**
     * Get isDeleted
     *
     * @return boolean
     */
    public function getIsDeleted()
    {
        return $this->isDeleted;
    }

    /**
     * Set code
     *
     * @param string $code
     *
     * @return ReminderType
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

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

    /**
     * Set description
     *
     * @param string $description
     *
     * @return ReminderType
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

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

    /**
     * Add accountUserReminder
     *
     * @param \RxConnexionBundle\Entity\AccountUserReminderEntity $accountUserReminder
     *
     * @return ReminderTypeEntity
     */
    public function addAccountUserReminder(\RxConnexionBundle\Entity\AccountUserReminderEntity $accountUserReminder)
    {
        $this->accountUserReminders[] = $accountUserReminder;

        return $this;
    }

    /**
     * Remove accountUserReminder
     *
     * @param \RxConnexionBundle\Entity\AccountUserReminderEntity $accountUserReminder
     */
    public function removeAccountUserReminder(\RxConnexionBundle\Entity\AccountUserReminderEntity $accountUserReminder)
    {
        $this->accountUserReminders->removeElement($accountUserReminder);
    }

    /**
     * Get accountUserReminders
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAccountUserReminders()
    {
        return $this->accountUserReminders;
    }
}
