<?php

namespace RxConnexionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use RxConnexionBundle\Entity\Base\BaseEntity;
use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\MaxDepth;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\PatientLetterCovidScreeningRepository")
 * @ORM\Table(name="patient_letter_hsat_loan_agreement")
 */

class PatientLetterHsatLoanAgreementEntity extends BaseEntity
{
    /**
     * @ORM\Column(name="date", type="datetime", nullable=true)
     * @Groups("forAudit")
     */
    protected $date;

    /**
     * @ORM\Column(name="drivers_license", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $driversLicense;

    /**
     * @ORM\Column(name="is_hsat_device", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $isHsatDevice;

    /**
     * @ORM\Column(name="cc_no", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $ccNo;

    /**
     * @ORM\Column(name="cc_exp", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $ccExp;

    /**
     * @ORM\Column(name="cc_ccv", type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $ccCCv;

    /**
     * @ORM\Column(name="term_one", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $termOne;

    /**
     * @ORM\Column(name="term_two", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $termTwo;

    /**
     * @ORM\Column(name="term_three", type="boolean", nullable=true)
     * @Groups("forAudit")
     */
    protected $termThree;

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


    /**
     * Set createdAt
     *
     * @ORM\PrePersist
     */
    public function setCreatedAtValue()
    {
        parent::setCreatedAtValue();
    }

    public function __construct()
    {

    }

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

    /**
     * get dateAsString
     *
     * @return string
     */
    public function getDateAsString() {

        $dttst = new DateTimeToStringTransformer();

        return !empty($this->date) ? date('m/d/Y', strtotime($dttst->transform($this->date))) : '';
    }

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


    /**
     * Set date
     *
     * @param \DateTime $date
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setDate($date)
    {
        $this->date = empty($date) ? NULL : new \DateTime($date);

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set driversLicense
     *
     * @param string $driversLicense
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setDriversLicense($driversLicense)
    {
        $this->driversLicense = $driversLicense;

        return $this;
    }

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

    /**
     * Set ccNo
     *
     * @param string $ccNo
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setCcNo($ccNo)
    {
        $this->ccNo = $ccNo;

        return $this;
    }

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

    /**
     * Set ccExp
     *
     * @param string $ccExp
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setCcExp($ccExp)
    {
        $this->ccExp = $ccExp;

        return $this;
    }

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

    /**
     * Set ccCCv
     *
     * @param string $ccCCv
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setCcCCv($ccCCv)
    {
        $this->ccCCv = $ccCCv;

        return $this;
    }

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

    /**
     * Set termOne
     *
     * @param string $termOne
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setTermOne($termOne)
    {
        $this->termOne = $termOne;

        return $this;
    }

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

    /**
     * Set termTwo
     *
     * @param string $termTwo
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setTermTwo($termTwo)
    {
        $this->termTwo = $termTwo;

        return $this;
    }

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

    /**
     * Set termThree
     *
     * @param string $termThree
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setTermThree($termThree)
    {
        $this->termThree = $termThree;

        return $this;
    }

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

    /**
     * Set patientLetter
     *
     * @param \RxConnexionBundle\Entity\PatientLetterEntity $patientLetter
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    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 isHsatDevice
     *
     * @param boolean $isHsatDevice
     *
     * @return PatientLetterHsatLoanAgreementEntity
     */
    public function setIsHsatDevice($isHsatDevice)
    {
        $this->isHsatDevice = $isHsatDevice;

        return $this;
    }

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