<?php

namespace AppBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
use Oh\GoogleMapFormTypeBundle\Validator\Constraints as OhAssert;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;

/**
 * Job
 *
 * @ORM\Table(name="job")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\JobRepository")
 */
class Job
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
	
	/**
     * @Gedmo\Slug(fields={"name"})
     * @ORM\Column(name="slug", type="string", length=255, unique=true)
     */
    protected $slug;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="job_description", type="text")
     */
    private $job_description;

   
      /**
     * @var string
     *
     * @ORM\Column(name="company", type="string", length=255, nullable=true)
     */
    private $company;
	/**
     * @var string
     *
     * @ORM\Column(name="company_description", type="text", nullable=true)
     */
    private $company_description;
	

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="deadline", type="date")
     */
    private $deadline;

    
	 /**
	 ///@ORM\ManyToOne(targetEntity="AppBundle\Entity\Sector")
	 ///@ORM\JoinColumn(nullable=true)
	//private $sector; */

    /**
     * @var string
     *
     * @ORM\Column(name="contact", type="string", length=255)
     */
    private $contact;
	
	/**
     * @var string
     *
     * @ORM\Column(name="latitude", type="decimal",scale=7, nullable=true)
     */
    private $latitude;

    /**
     * @var string
     *
     * @ORM\Column(name="longitude", type="decimal", scale=7, nullable=true)
     */
    private $longitude;
	
	private $latlng;

    /**
     * @var string
     *
     * @ORM\Column(name="location_adresse", type="string", length=255, nullable=true)
     */
    private $location_adresse;

    /**
     * @var string
     *
     * @ORM\Column(name="street", type="string", length=255, nullable=true)
     */
    private $street;

    /**
     * @var string
     *
     * @ORM\Column(name="number", type="string", length=255, nullable=true)
     */
    private $number;

    /**
     * @var string
     *
     * @ORM\Column(name="zip", type="string", length=255, nullable=true)
     */
    private $zip;

    /**
     * @var string
     *
     * @ORM\Column(name="city", type="string", length=255, nullable=true)
     */
    private $city;
	
    /**
     * @var boolean
     *
     * @ORM\Column(name="published", type="boolean")
     */
    private $published;
	
    /**
     * @var string
     *
     * @ORM\Column(name="authoremail", type="string", length=255, nullable=true)
     */
    private $authoremail;
    /**
     * @var string
     *
     * @ORM\Column(name="authorphonenumber", type="string", length=255, nullable=true)
     */
    private $authorphonenumber;
    /**
     * @var string
     *
     * @ORM\Column(name="fonction", type="string", length=255, nullable=true)
     */
    private $fonction;
    /**
     * @var string
     *
     * @ORM\Column(name="type", type="string", length=255, nullable=true)
     */
    private $type;
    /**
     * @var string
     *
     * @ORM\Column(name="sector", type="string", length=255, nullable=true)
     */
    private $sector;
    /**
     * @var string
     *
     * @ORM\Column(name="hierarchy", type="string", length=255, nullable=true)
     */
    private $hierarchy;
	
    /**
     * @var string
     *
     * @ORM\Column(name="linkedinURL", type="string", length=255, nullable=true)
     */
    private $linkedinURL;
   
    /**
     * Get id
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     *
     * @return Job
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

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

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

        return $this;
    }

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

/**
     * Set company
     *
     * @param string $company
     *
     * @return Job
     */
    public function setCompany($company)
    {
        $this->company = $company;

        return $this;
    }

    /**
     * Get company
     *
     * @return string
     */
    public function getCompany()
    {
        return $this->company;
    }
	
	 /**
     * Set latitude
     *
     * @param string $latitude
     *
     * @return Event
     */
    public function setLatitude($latitude)
    {
        $this->latitude = $latitude;

        return $this;
    }

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

    /**
     * Set longitude
     *
     * @param string $longitude
     *
     * @return Event
     */
    public function setLongitude($longitude)
    {
        $this->longitude = $longitude;

        return $this;
    }

    /**
     * Get longitude
     *
     * @return string
     */
    public function getLongitude()
    {
        return $this->longitude;
    }
	
    public function setLatLng($latlng)
    {
        $this->setLatitude($latlng['lat']);
        $this->setLongitude($latlng['lng']);
        return $this;
    }

    /**
     * @Assert\NotBlank()
     * @OhAssert\LatLng()
     */
    public function getLatLng()
    {
        return array('lat'=>$this->getLatitude(),'lng'=>$this->getLongitude());
    }

    /**
     * Set locationAdresse
     *
     * @param string $locationAdresse
     *
     * @return Event
     */
    public function setLocationAdresse($locationAdresse)
    {
        $this->location_adresse = $locationAdresse;

        return $this;
    }

    /**
     * Get locationAdresse
     *
     * @return string
     */
    public function getLocationAdresse()
    {
        return $this->location_adresse;
    }
	
	 /**
     * Set street
     *
     * @param string $street
     *
     * @return Event
     */
    public function setStreet($street)
    {
        $this->street = $street;

        return $this;
    }

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

    /**
     * Set number
     *
     * @param string $number
     *
     * @return Event
     */
    public function setNumber($number)
    {
        $this->number = $number;

        return $this;
    }

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

    /**
     * Set zip
     *
     * @param string $zip
     *
     * @return Event
     */
    public function setZip($zip)
    {
        $this->zip = $zip;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Set deadline
     *
     * @param \DateTime $deadline
     *
     * @return Job
     */
    public function setDeadline($deadline)
    {
        $this->deadline = $deadline;

        return $this;
    }

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

    /**
     * Set sector
     *
     * @param string
     *
     * @return Job
     */
    public function setSector($sector = null)
    {
        $this->sector = $sector;

        return $this;
    }

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


    /**
     * Set contact
     *
     * @param string $contact
     *
     * @return Job
     */
    public function setContact($contact)
    {
        $this->contact = $contact;

        return $this;
    }

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


    /**
     * Set published
     *
     * @param boolean $published
     *
     * @return Job
     */
    public function setPublished($published)
    {
        $this->published = $published;

        return $this;
    }

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

    /**
     * Set slug
     *
     * @param string $slug
     *
     * @return Job
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;

        return $this;
    }

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

    /**
     * Set jobDescription
     *
     * @param string $jobDescription
     *
     * @return Job
     */
    public function setJobDescription($jobDescription)
    {
        $this->job_description = $jobDescription;

        return $this;
    }

    /**
     * Get jobDescription
     *
     * @return string
     */
    public function getJobDescription()
    {
        return $this->job_description;
    }

    /**
     * Set companyDescription
     *
     * @param string $companyDescription
     *
     * @return Job
     */
    public function setCompanyDescription($companyDescription)
    {
        $this->company_description = $companyDescription;

        return $this;
    }

    /**
     * Get companyDescription
     *
     * @return string
     */
    public function getCompanyDescription()
    {
        return $this->company_description;
    }   

    /**
     * Set fonction
     *
     * @param string $fonction
     *
     * @return Job
     */
    public function setFonction($fonction)
    {
        $this->fonction = $fonction;

        return $this;
    }

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

    /**
     * Set type
     *
     * @param string $type
     *
     * @return Job
     */
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }

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

    /**
     * Set hierarchy
     *
     * @param string $hierarchy
     *
     * @return Job
     */
    public function setHierarchy($hierarchy)
    {
        $this->hierarchy = $hierarchy;

        return $this;
    }

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

    /**
     * Set authorphonenumber
     *
     * @param string $authorphonenumber
     *
     * @return Job
     */
    public function setAuthorphonenumber($authorphonenumber)
    {
        $this->authorphonenumber = $authorphonenumber;

        return $this;
    }

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

    /**
     * Set linkedinURL
     *
     * @param string $linkedinURL
     *
     * @return Job
     */
    public function setLinkedinURL($linkedinURL)
    {
        $this->linkedinURL = $linkedinURL;

        return $this;
    }

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

    /**
     * Set authoremail
     *
     * @param string $authoremail
     *
     * @return Job
     */
    public function setAuthoremail($authoremail)
    {
        $this->authoremail = $authoremail;

        return $this;
    }

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