<?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\Table(name="client")
 */

class Client
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $client_id;
    
    /**
     * @ORM\OneToMany(targetEntity="Notes", mappedBy="client")  
     */
    protected $notes;
    
    /**
     * @ORM\OneToMany(targetEntity="Assistance", mappedBy="client")  
     */
    protected $assistance;
    
    /**
     * @ORM\OneToOne(targetEntity="Referrals", mappedBy="client")  
     */
    protected $referrals;
    
    /**
     * @ORM\OneToOne(targetEntity="Finance", mappedBy="client")  
     */
    protected $finance;
    
        /**
     * @ORM\OneToOne(targetEntity="History", mappedBy="client")  
     */
    protected $history;
    
    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $current_address;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $city;
    
    /**
     * @ORM\Column(type="string", length=2, nullable=true)
     */
    protected $state;
    
    /**
     * @ORM\Column(type="string", length=5, nullable=true)
     */
    protected $zipcode;
    
    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $prev_address1;
    
    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    protected $prev_address2;
	
	
    // removed 9162012 per request
    // /**
     // * @ORM\Column(type="string", length=100, nullable=true)
     // */
    // protected $prev_address3;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $first_name;
    
    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    protected $middle_name;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $last_name;
    
    /**
     * @ORM\Column(type="string", length=11, nullable=true)
     */
    protected $ssn;
    
    /**
     * @ORM\Column(type="datetime")
     */
    protected $birth_date;
    
    /**
     * @ORM\Column(type="string", length=1, nullable=true)
     */
    protected $gender;    
    
    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    protected $home_phone;
    
    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    protected $cell_phone;
    
    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    protected $work_phone;
    
    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    protected $license_no;
    
    /**
     * @ORM\Column(type="string", length=2, nullable=true)
     */
    protected $license_state;
    
    /**
     * @ORM\ManyToOne(targetEntity="Ethnicity")
     */
    protected $ethnicity;
      
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $employer;
    
    /**
     * @ORM\Column(type="string", length=3, nullable=true)
     */
    protected $employment_type;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $alias;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $church_affiliation;
    
    /**
     * @ORM\Column(type="string", length=50, nullable=true)
     */
    protected $email;
    
    
	 
	 
	 // changed per MC 0808lmd
    // /**
    // * @ORM\Column(type="string", nullable=true)
    //  */
    // protected $spouse_other_name;
    
    // /**
     // * @ORM\Column(type="string", nullable=true)
     // */
    // protected $spouse_other_ssn;
    
    // /**
     // * @ORM\Column(type="datetime", nullable=true)
     // */
    // protected $spouse_other_birthdate;
	
	
	
	// new code per MC request 0808lmd
	
	/**
     * @ORM\Column(type="string", length=30, nullable=true)
     */
    protected $other_adult_oneFirstName;
	/**
     * @ORM\Column(type="string", length=30, nullable=true)
	*/
    protected $other_adult_oneLastName;
	/**
     * @ORM\Column(type="string", length=11, nullable=true)
     */
    protected $other_adult_oneSsn;
	/**
     * @ORM\Column(type="string", length=30, nullable=true)
     */
    protected $other_adult_twoFirstName;
	/**
     * @ORM\Column(type="string", length=30, nullable=true)
     */
    protected $other_adult_twoLastName;
	/**
     * @ORM\Column(type="string", length=11, nullable=true)
     */
    protected $other_adult_twoSsn;
	
	// end of new code
 
  
	  /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $children;
  
    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $is_active;

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

    public function getFullName()
    {
        return $this->first_name . " " . $this->middle_name . " " . $this->last_name;
    }
	
	public function getFullAddress()
    {
        return $this->current_address . ",  " . $this->city . ",  " . $this->state  . "   " . $this->zipcode  ;
    }
    
    
    /**
     * Get client_id
     *
     * @return integer 
     */
    public function getClientId()
    {
        return $this->client_id;
    }

    /**
     * Set first_name
     *
     * @param string $firstName
     */
    public function setFirstName($firstName)
    {
        $this->first_name = $firstName;
    }

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

   

    /**
     * Set last_name
     *
     * @param string $lastName
     */
    public function setLastName($lastName)
    {
        $this->last_name = $lastName;
    }

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

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

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

    /**
     * Set birth_date
     *
     * @param datetime $birthDate
     */
    public function setBirthDate($birthDate)
    {
        $this->birth_date = $birthDate;
    }

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

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

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

    /**
     * Set home_phone
     *
     * @param string $homePhone
     */
    public function setHomePhone($homePhone)
    {
        $this->home_phone = $homePhone;
    }

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

    /**
     * Set cell_phone
     *
     * @param string $cellPhone
     */
    public function setCellPhone($cellPhone)
    {
        $this->cell_phone = $cellPhone;
    }

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

    /**
     * Set work_phone
     *
     * @param string $workPhone
     */
    public function setWorkPhone($workPhone)
    {
        $this->work_phone = $workPhone;
    }

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

    /**
     * Set license_no
     *
     * @param string $licenseNo
     */
    public function setLicenseNo($licenseNo)
    {
        $this->license_no = $licenseNo;
    }

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

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

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


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

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

    /**
     * Set employment_type
     *
     * @param string $employmentType
     */
    public function setEmploymentType($employmentType)
    {
        $this->employment_type = $employmentType;
    }

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

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

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

    /**
     * Set church_affiliation
     *
     * @param string $churchAffiliation
     */
    public function setChurchAffiliation($churchAffiliation)
    {
        $this->church_affiliation = $churchAffiliation;
    }

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

    /**
     * Set children_detail_id
     *
     * @param integer $childrenDetailId
     */
    public function setChildrenDetailId($childrenDetailId)
    {
        $this->children_detail_id = $childrenDetailId;
    }

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

    /**
     * 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;
    }

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

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

    /**
     * Add notes
     *
     * @param Dorcas\TabithaBundle\Entity\Notes $notes
     */
    public function addNotes(\Dorcas\TabithaBundle\Entity\Notes $notes)
    {
        $this->notes[] = $notes;
    }

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


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

   public function __construct()
    {
        $this->setCreatedDt(new \DateTime());
        $this->setModifiedDt(new \DateTime());
        $this->notes = new \Doctrine\Common\Collections\ArrayCollection();
        $this->setIsActive(true);
   //     $this->ethnicity_id = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Set ethnicity
     *
     * @param Dorcas\TabithaBundle\Entity\Ethnicity $ethnicity
     */
    public function setEthnicity(\Dorcas\TabithaBundle\Entity\Ethnicity $ethnicity)
    {
        $this->ethnicity = $ethnicity;
    }

    /**
     * Get ethnicity
     *
     * @return Dorcas\TabithaBundle\Entity\Ethnicity 
     */
    public function getEthnicity()
    {
        return $this->ethnicity;
    }

    /**
     * Set is_active
     *
     * @param boolean $isActive
     */
    public function setIsActive($isActive)
    {
        $this->is_active = $isActive;
    }

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

    /**
     * Set referrals
     *
     * @param Dorcas\TabithaBundle\Entity\Referrals $referrals
     */
    public function setReferrals(\Dorcas\TabithaBundle\Entity\Referrals $referrals)
    {
        $this->referrals = $referrals;
    }

    /**
     * Get referrals
     *
     * @return Dorcas\TabithaBundle\Entity\Referrals 
     */
    public function getReferrals()
    {
        return $this->referrals;
    }

    /**
     * Set finance
     *
     * @param Dorcas\TabithaBundle\Entity\Finance $finance
     */
    public function setFinance(\Dorcas\TabithaBundle\Entity\Finance $finance)
    {
        $this->finance = $finance;
    }

    /**
     * Get finance
     *
     * @return Dorcas\TabithaBundle\Entity\Finance 
     */
    public function getFinance()
    {
        return $this->finance;
    }

    /**
     * Set current_address
     *
     * @param string $currentAddress
     */
    public function setCurrentAddress($currentAddress)
    {
        $this->current_address = $currentAddress;
    }

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

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

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

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

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

    /**
     * Set prev_address1
     *
     * @param string $prevAddress1
     */
    public function setPrevAddress1($prevAddress1)
    {
        $this->prev_address1 = $prevAddress1;
    }

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

    /**
     * Set prev_address2
     *
     * @param string $prevAddress2
     */
    public function setPrevAddress2($prevAddress2)
    {
        $this->prev_address2 = $prevAddress2;
    }

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

    /**
     * Set prev_address3
     *
     * @param string $prevAddress3
     */
    public function setPrevAddress3($prevAddress3)
    {
        $this->prev_address3 = $prevAddress3;
    }

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

    /**
     * Set license_state
     *
     * @param string $licenseState
     */
    public function setLicenseState($licenseState)
    {
        $this->license_state = $licenseState;
    }

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

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

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

    /**
     * Set other_adult_oneFirstName
     *
     * @param string $otherAdultOneFirstName
     */
    public function setOtherAdultOneFirstName($otherAdultOneFirstName)
    {
        $this->other_adult_oneFirstName = $otherAdultOneFirstName;
    }

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

    /**
     * Set other_adult_oneLastName
     *
     * @param string $otherAdultOneLastName
     */
    public function setOtherAdultOneLastName($otherAdultOneLastName)
    {
        $this->other_adult_oneLastName = $otherAdultOneLastName;
    }

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

    /**
     * Set other_adult_oneSsn
     *
     * @param string $otherAdultOneSsn
     */
    public function setOtherAdultOneSsn($otherAdultOneSsn)
    {
        $this->other_adult_oneSsn = $otherAdultOneSsn;
    }

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

    /**
     * Set other_adult_twoFirstName
     *
     * @param string $otherAdultTwoFirstName
     */
    public function setOtherAdultTwoFirstName($otherAdultTwoFirstName)
    {
        $this->other_adult_twoFirstName = $otherAdultTwoFirstName;
    }

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

    /**
     * Set other_adult_twoLastName
     *
     * @param string $otherAdultTwoLastName
     */
    public function setOtherAdultTwoLastName($otherAdultTwoLastName)
    {
        $this->other_adult_twoLastName = $otherAdultTwoLastName;
    }

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

    /**
     * Set other_adult_twoSsn
     *
     * @param string $otherAdultTwoSsn
     */
    public function setOtherAdultTwoSsn($otherAdultTwoSsn)
    {
        $this->other_adult_twoSsn = $otherAdultTwoSsn;
    }

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

    /**
     * Set history
     *
     * @param Dorcas\TabithaBundle\Entity\History $history
     */
    public function setHistory(\Dorcas\TabithaBundle\Entity\History $history)
    {
        $this->history = $history;
    }

    /**
     * Get history
     *
     * @return Dorcas\TabithaBundle\Entity\History 
     */
    public function getHistory()
    {
        return $this->history;
    }

    /**
     * Add assistance
     *
     * @param Dorcas\TabithaBundle\Entity\Assistance $assistance
     */
    public function addAssistance(\Dorcas\TabithaBundle\Entity\Assistance $assistance)
    {
        $this->assistance[] = $assistance;
    }

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

    /**
     * Set middle_name
     *
     * @param string $middleName
     */
    public function setMiddleName($middleName)
    {
        $this->middle_name = $middleName;
    }

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