Skip to content

Instantly share code, notes, and snippets.

@ABM-Dan
Last active January 26, 2016 18:18
Show Gist options
  • Save ABM-Dan/3308646a3228d95bd709 to your computer and use it in GitHub Desktop.
Save ABM-Dan/3308646a3228d95bd709 to your computer and use it in GitHub Desktop.
<?php
namespace MyBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* RecentSearch
*
* @ORM\Table("recent_search")
* @ORM\Entity(repositoryClass="MyBundle\Repository\RecentSearchRepository")
*/
class RecentSearch
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var integer
*
* @ORM\ManyToOne(targetEntity="MyBundle\Entity\Customer", inversedBy="RecentSearches")
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
*/
private $customer;
/**
* @var string
*
* @ORM\Column(name="timestamp", type="datetime", nullable=false)
* @ORM\Version
*/
private $timestamp;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set timestamp
*
* @param \DateTime $timestamp
*
* @return RecentSearch
*/
public function setTimestamp($timestamp)
{
$this->timestamp = $timestamp;
return $this;
}
/**
* Get timestamp
*
* @return \DateTime
*/
public function getTimestamp()
{
return $this->timestamp;
}
/**
* Set lot
*
* @param \MyBundle\Entity\Lot $lot
*
* @return RecentSearch
*/
public function setLot(\MyBundle\Entity\Lot $lot = null)
{
$this->lot = $lot;
return $this;
}
/**
* Get lot
*
* @return \MyBundle\Entity\Lot
*/
public function getLot()
{
return $this->lot;
}
/**
* Set customer
*
* @param \MyBundle\Entity\Customer $customer
*
* @return RecentSearch
*/
public function setCustomer(\MyBundle\Entity\Customer $customer = null)
{
$this->customer = $customer;
return $this;
}
/**
* Get customer
*
* @return \MyBundle\Entity\Customer
*/
public function getCustomer()
{
return $this->customer;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment