<?php

namespace RxConnexionBundle\Entity;

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


/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\AccountRepository")
 * @ORM\Table(name="account")
 */

class AccountEntity extends BaseEntity
{
    /**
     * @ORM\Column(type="string", nullable=true)
     * @Groups("forAudit")
     */
    protected $code;

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

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

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

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

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

    /**
     * @ORM\OneToMany(targetEntity="CompanyEntity", mappedBy="account")
     */
    protected $companies;

    /**
     * @ORM\OneToMany(targetEntity="AccountUserTypeEntity", mappedBy="account")
     */
    protected $userTypes;

    /**
     * @ORM\OneToMany(targetEntity="ProviderTypeEntity", mappedBy="account")
     */
    protected $providerTypes;

    /**
     * @ORM\OneToMany(targetEntity="ChartTypeEntity", mappedBy="account")
     */
    protected $chartTypes;

    /**
     * @ORM\OneToMany(targetEntity="ChartStatusEntity", mappedBy="account")
     */
    protected $chartStatuses;

    /**
     * @ORM\OneToMany(targetEntity="ChartProcedureEntity", mappedBy="account")
     */
    protected $chartProcedures;

    /**
     * @ORM\OneToMany(targetEntity="ScheduleStatusEntity", mappedBy="account")
     */
    protected $scheduleStatuses;

    /**
     * @ORM\OneToMany(targetEntity="ScheduleQueuedStatusEntity", mappedBy="account")
     */
    protected $scheduleQueuedStatuses;

    /**
     * @ORM\OneToMany(targetEntity="PatientEntity", mappedBy="account")
     */
    protected $patients;

    /**
     * @ORM\OneToMany(targetEntity="PortalEntity", mappedBy="account")
     */
    protected $portals;

    /**
     * @ORM\OneToMany(targetEntity="HealthFacilityEntity", mappedBy="account")
     */
    protected $healthFacilities;

    /**
     * @ORM\OneToMany(targetEntity="InsuranceEntity", mappedBy="account")
     */
    protected $insurances;

    /**
     * @ORM\OneToMany(targetEntity="MarketingStaffTypeEntity", mappedBy="account")
     */
    protected $marketingStaffTypes;

    /**
     * @ORM\OneToMany(targetEntity="RxConnexionBundle\Entity\MarketingStaffScheduleQueuedStatusEntity", mappedBy="account")
     */
    protected $marketingStaffScheduleQueuedStatuses;

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

    public function __construct()
    {
        $this->companies = new ArrayCollection();
        $this->userTypes = new ArrayCollection();
        $this->providerTypes = new ArrayCollection();
        $this->chartTypes = new ArrayCollection();
        $this->chartStatuses = new ArrayCollection();
        $this->chartProcedures = new ArrayCollection();
        $this->scheduleStatuses = new ArrayCollection();
        $this->scheduleQueuedStatuses = new ArrayCollection();
        $this->patients = new ArrayCollection();
        $this->portals = new ArrayCollection();
        $this->healthFacilities = new ArrayCollection();
        $this->insurances = new ArrayCollection();
        $this->marketingStaffTypes = new ArrayCollection();
        $this->marketingStaffScheduleQueuedStatuses = new ArrayCollection();
    }


    /*--------------------------------------------------------------------------------------------------------*/
    /*					Use Defined Setters and Getters														  */
    /*--------------------------------------------------------------------------------------------------------*/

    /**
     * Get idAndDescription
     *
     * @return string
     */
    public function getIdAndDescription() {

        return $this->id . ' - ' . $this->description;
    }

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


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

        return $this;
    }

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

    /**
     * Set email
     *
     * @param string $email
     *
     * @return AccountEntity
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

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

    /**
     * Set mobileNo
     *
     * @param string $mobileNo
     *
     * @return AccountEntity
     */
    public function setMobileNo($mobileNo)
    {
        $this->mobileNo = $mobileNo;

        return $this;
    }

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

    /**
     * Set phoneNo
     *
     * @param string $phoneNo
     *
     * @return AccountEntity
     */
    public function setPhoneNo($phoneNo)
    {
        $this->phoneNo = $phoneNo;

        return $this;
    }

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

    /**
     * Add company
     *
     * @param \RxConnexionBundle\Entity\CompanyEntity $company
     *
     * @return AccountEntity
     */
    public function addCompany(\RxConnexionBundle\Entity\CompanyEntity $company)
    {
        $this->companies[] = $company;

        return $this;
    }

    /**
     * Remove company
     *
     * @param \RxConnexionBundle\Entity\CompanyEntity $company
     */
    public function removeCompany(\RxConnexionBundle\Entity\CompanyEntity $company)
    {
        $this->companies->removeElement($company);
    }

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

    /**
     * Add userType
     *
     * @param \RxConnexionBundle\Entity\AccountUserTypeEntity $userType
     *
     * @return AccountEntity
     */
    public function addUserType(\RxConnexionBundle\Entity\AccountUserTypeEntity $userType)
    {
        $this->userTypes[] = $userType;

        return $this;
    }

    /**
     * Remove userType
     *
     * @param \RxConnexionBundle\Entity\AccountUserTypeEntity $userType
     */
    public function removeUserType(\RxConnexionBundle\Entity\AccountUserTypeEntity $userType)
    {
        $this->userTypes->removeElement($userType);
    }

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

    /**
     * Add providerType
     *
     * @param \RxConnexionBundle\Entity\ProviderTypeEntity $providerType
     *
     * @return AccountEntity
     */
    public function addProviderType(\RxConnexionBundle\Entity\ProviderTypeEntity $providerType)
    {
        $this->providerTypes[] = $providerType;

        return $this;
    }

    /**
     * Remove providerType
     *
     * @param \RxConnexionBundle\Entity\ProviderTypeEntity $providerType
     */
    public function removeProviderType(\RxConnexionBundle\Entity\ProviderTypeEntity $providerType)
    {
        $this->providerTypes->removeElement($providerType);
    }

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

    /**
     * Add chartType
     *
     * @param \RxConnexionBundle\Entity\ChartTypeEntity $chartType
     *
     * @return AccountEntity
     */
    public function addChartType(\RxConnexionBundle\Entity\ChartTypeEntity $chartType)
    {
        $this->chartTypes[] = $chartType;

        return $this;
    }

    /**
     * Remove chartType
     *
     * @param \RxConnexionBundle\Entity\ChartTypeEntity $chartType
     */
    public function removeChartType(\RxConnexionBundle\Entity\ChartTypeEntity $chartType)
    {
        $this->chartTypes->removeElement($chartType);
    }

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

    /**
     * Add chartStatus
     *
     * @param \RxConnexionBundle\Entity\ChartStatusEntity $chartStatus
     *
     * @return AccountEntity
     */
    public function addChartStatus(\RxConnexionBundle\Entity\ChartStatusEntity $chartStatus)
    {
        $this->chartStatuses[] = $chartStatus;

        return $this;
    }

    /**
     * Remove chartStatus
     *
     * @param \RxConnexionBundle\Entity\ChartStatusEntity $chartStatus
     */
    public function removeChartStatus(\RxConnexionBundle\Entity\ChartStatusEntity $chartStatus)
    {
        $this->chartStatuses->removeElement($chartStatus);
    }

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

    /**
     * Add chartProcedure
     *
     * @param \RxConnexionBundle\Entity\ChartProcedureEntity $chartProcedure
     *
     * @return AccountEntity
     */
    public function addChartProcedure(\RxConnexionBundle\Entity\ChartProcedureEntity $chartProcedure)
    {
        $this->chartProcedures[] = $chartProcedure;

        return $this;
    }

    /**
     * Remove chartProcedure
     *
     * @param \RxConnexionBundle\Entity\ChartProcedureEntity $chartProcedure
     */
    public function removeChartProcedure(\RxConnexionBundle\Entity\ChartProcedureEntity $chartProcedure)
    {
        $this->chartProcedures->removeElement($chartProcedure);
    }

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

    /**
     * Add scheduleStatus
     *
     * @param \RxConnexionBundle\Entity\ScheduleStatusEntity $scheduleStatus
     *
     * @return AccountEntity
     */
    public function addScheduleStatus(\RxConnexionBundle\Entity\ScheduleStatusEntity $scheduleStatus)
    {
        $this->scheduleStatuses[] = $scheduleStatus;

        return $this;
    }

    /**
     * Remove scheduleStatus
     *
     * @param \RxConnexionBundle\Entity\ScheduleStatusEntity $scheduleStatus
     */
    public function removeScheduleStatus(\RxConnexionBundle\Entity\ScheduleStatusEntity $scheduleStatus)
    {
        $this->scheduleStatuses->removeElement($scheduleStatus);
    }

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

    /**
     * Add scheduleQueuedStatus
     *
     * @param \RxConnexionBundle\Entity\ScheduleQueuedStatusEntity $scheduleQueuedStatus
     *
     * @return AccountEntity
     */
    public function addScheduleQueuedStatus(\RxConnexionBundle\Entity\ScheduleQueuedStatusEntity $scheduleQueuedStatus)
    {
        $this->scheduleQueuedStatuses[] = $scheduleQueuedStatus;

        return $this;
    }

    /**
     * Remove scheduleQueuedStatus
     *
     * @param \RxConnexionBundle\Entity\ScheduleQueuedStatusEntity $scheduleQueuedStatus
     */
    public function removeScheduleQueuedStatus(\RxConnexionBundle\Entity\ScheduleQueuedStatusEntity $scheduleQueuedStatus)
    {
        $this->scheduleQueuedStatuses->removeElement($scheduleQueuedStatus);
    }

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

    /**
     * Add patient
     *
     * @param \RxConnexionBundle\Entity\PatientEntity $patient
     *
     * @return AccountEntity
     */
    public function addPatient(\RxConnexionBundle\Entity\PatientEntity $patient)
    {
        $this->patients[] = $patient;

        return $this;
    }

    /**
     * Remove patient
     *
     * @param \RxConnexionBundle\Entity\PatientEntity $patient
     */
    public function removePatient(\RxConnexionBundle\Entity\PatientEntity $patient)
    {
        $this->patients->removeElement($patient);
    }

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

    /**
     * Add portal
     *
     * @param \RxConnexionBundle\Entity\PortalEntity $portal
     *
     * @return AccountEntity
     */
    public function addPortal(\RxConnexionBundle\Entity\PortalEntity $portal)
    {
        $this->portals[] = $portal;

        return $this;
    }

    /**
     * Remove portal
     *
     * @param \RxConnexionBundle\Entity\PortalEntity $portal
     */
    public function removePortal(\RxConnexionBundle\Entity\PortalEntity $portal)
    {
        $this->portals->removeElement($portal);
    }

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

    /**
     * Add healthFacility
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility
     *
     * @return AccountEntity
     */
    public function addHealthFacility(\RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility)
    {
        $this->healthFacilities[] = $healthFacility;

        return $this;
    }

    /**
     * Remove healthFacility
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility
     */
    public function removeHealthFacility(\RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility)
    {
        $this->healthFacilities->removeElement($healthFacility);
    }

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

    /**
     * Add insurance
     *
     * @param \RxConnexionBundle\Entity\InsuranceEntity $insurance
     *
     * @return AccountEntity
     */
    public function addInsurance(\RxConnexionBundle\Entity\InsuranceEntity $insurance)
    {
        $this->insurances[] = $insurance;

        return $this;
    }

    /**
     * Remove insurance
     *
     * @param \RxConnexionBundle\Entity\InsuranceEntity $insurance
     */
    public function removeInsurance(\RxConnexionBundle\Entity\InsuranceEntity $insurance)
    {
        $this->insurances->removeElement($insurance);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Add marketingStaffType
     *
     * @param \RxConnexionBundle\Entity\MarketingStaffTypeEntity $marketingStaffType
     *
     * @return AccountEntity
     */
    public function addMarketingStaffType(\RxConnexionBundle\Entity\MarketingStaffTypeEntity $marketingStaffType)
    {
        $this->marketingStaffTypes[] = $marketingStaffType;

        return $this;
    }

    /**
     * Remove marketingStaffType
     *
     * @param \RxConnexionBundle\Entity\MarketingStaffTypeEntity $marketingStaffType
     */
    public function removeMarketingStaffType(\RxConnexionBundle\Entity\MarketingStaffTypeEntity $marketingStaffType)
    {
        $this->marketingStaffTypes->removeElement($marketingStaffType);
    }

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

    /**
     * Add marketingStaffScheduleQueuedStatus
     *
     * @param \RxConnexionBundle\Entity\MarketingStaffScheduleQueuedStatusEntity $marketingStaffScheduleQueuedStatus
     *
     * @return AccountEntity
     */
    public function addMarketingStaffScheduleQueuedStatus(\RxConnexionBundle\Entity\MarketingStaffScheduleQueuedStatusEntity $marketingStaffScheduleQueuedStatus)
    {
        $this->marketingStaffScheduleQueuedStatuses[] = $marketingStaffScheduleQueuedStatus;

        return $this;
    }

    /**
     * Remove marketingStaffScheduleQueuedStatus
     *
     * @param \RxConnexionBundle\Entity\MarketingStaffScheduleQueuedStatusEntity $marketingStaffScheduleQueuedStatus
     */
    public function removeMarketingStaffScheduleQueuedStatus(\RxConnexionBundle\Entity\MarketingStaffScheduleQueuedStatusEntity $marketingStaffScheduleQueuedStatus)
    {
        $this->marketingStaffScheduleQueuedStatuses->removeElement($marketingStaffScheduleQueuedStatus);
    }

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