Skip to content

Instantly share code, notes, and snippets.

@codecowboy
Created September 1, 2011 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecowboy/1185861 to your computer and use it in GitHub Desktop.
Save codecowboy/1185861 to your computer and use it in GitHub Desktop.
Motivation Entity
<?php
namespace Gymloop\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Gymloop\CoreBundle\Entity\Motivation
*
* @ORM\Table(name="gymloop_motivation")
* @ORM\Entity(repositoryClass="Gymloop\CoreBundle\Entity\MotivationRepository")
*/
class Motivation
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="motivation")
*/
protected $user;
/**
* @var datetime $date
*
* @ORM\Column(name="date", type="datetime")
*/
private $date;
/**
* @var integer $amount
*
* @ORM\Column(name="amount", type="integer")
*/
private $amount;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set date
*
* @param datetime $date
*/
public function setDate($date)
{
$this->date = $date;
}
/**
* Get date
*
* @return datetime
*/
public function getDate()
{
return $this->date;
}
/**
* Set amount
*
* @param integer $amount
*/
public function setAmount($amount)
{
$this->amount = $amount;
}
/**
* Get amount
*
* @return integer
*/
public function getAmount()
{
return $this->amount;
}
/**
* Set user
*
* @param Gymloop\CoreBundle\Entity\User $user
*/
public function setUser(\Gymloop\CoreBundle\Entity\User $user)
{
$this->user = $user;
}
/**
* Get user
*
* @return Gymloop\CoreBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment