<?php

namespace RxConnexionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use RxConnexionBundle\Entity\Base\BaseEntity;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\FaxTranOutboundRepository")
 * @ORM\Table(name="fax_tran_outbound", indexes={@ORM\Index(name="IDX_000AAA", columns={"source", "status"}), @ORM\Index(name="IDX_000BBB", columns={"source"})})
 */

class FaxTranOutboundEntity extends BaseEntity
{
    const SOURCE_PATIENT_LETTER = 'PL';
    const SOURCE_SCHEDULE_NOTICE = 'SN';

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

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

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

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

    /**
     * @ORM\Column(type="boolean")
     */
    protected $status;

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

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

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

    /**
     * @ORM\ManyToOne(targetEntity="PatientLetterEntity", inversedBy="faxTranOutbounds")
     * @ORM\JoinColumn(name="patient_letter_id", referencedColumnName="id")
     */
    protected $patientLetter;

    /**
     * @ORM\ManyToOne(targetEntity="AppointmentNoticeFaxEntity", inversedBy="faxTranOutbounds")
     * @ORM\JoinColumn(name="appointment_notice_fax_id", referencedColumnName="id")
     */
    protected $appointmentNoticeFax;

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

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

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

    /**
     * Set source
     *
     * @param string $source
     *
     * @return FaxTranOutboundEntity
     */
    public function setSource($source)
    {
        $this->source = $source;

        return $this;
    }

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

    /**
     * Set faxType
     *
     * @param string $faxType
     *
     * @return FaxTranOutboundEntity
     */
    public function setFaxType($faxType)
    {
        $this->faxType = $faxType;

        return $this;
    }

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

    /**
     * Set faxNo
     *
     * @param string $faxNo
     *
     * @return FaxTranOutboundEntity
     */
    public function setFaxNo($faxNo)
    {
        $this->faxNo = $faxNo;

        return $this;
    }

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

    /**
     * Set fileName
     *
     * @param string $fileName
     *
     * @return FaxTranOutboundEntity
     */
    public function setFileName($fileName)
    {
        $this->fileName = $fileName;

        return $this;
    }

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

    /**
     * Set faxId
     *
     * @param string $faxId
     *
     * @return FaxTranOutboundEntity
     */
    public function setFaxId($faxId)
    {
        $this->faxId = $faxId;

        return $this;
    }

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

    /**
     * Set status
     *
     * @param boolean $status
     *
     * @return FaxTranOutboundEntity
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

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

    /**
     * Set msg
     *
     * @param string $msg
     *
     * @return FaxTranOutboundEntity
     */
    public function setMsg($msg)
    {
        $this->msg = $msg;

        return $this;
    }

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

    /**
     * Set patientLetter
     *
     * @param \RxConnexionBundle\Entity\PatientLetterEntity $patientLetter
     *
     * @return FaxTranOutboundEntity
     */
    public function setPatientLetter(\RxConnexionBundle\Entity\PatientLetterEntity $patientLetter = null)
    {
        $this->patientLetter = $patientLetter;

        return $this;
    }

    /**
     * Get patientLetter
     *
     * @return \RxConnexionBundle\Entity\PatientLetterEntity
     */
    public function getPatientLetter()
    {
        return $this->patientLetter;
    }

    /**
     * Set appointmentNoticeFax
     *
     * @param \RxConnexionBundle\Entity\AppointmentNoticeFaxEntity $appointmentNoticeFax
     *
     * @return FaxTranOutboundEntity
     */
    public function setAppointmentNoticeFax(\RxConnexionBundle\Entity\AppointmentNoticeFaxEntity $appointmentNoticeFax = null)
    {
        $this->appointmentNoticeFax = $appointmentNoticeFax;

        return $this;
    }

    /**
     * Get appointmentNoticeFax
     *
     * @return \RxConnexionBundle\Entity\AppointmentNoticeFaxEntity
     */
    public function getAppointmentNoticeFax()
    {
        return $this->appointmentNoticeFax;
    }

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

        return $this;
    }

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