Skip to content

Instantly share code, notes, and snippets.

@codecowboy
Created June 30, 2011 18:18
Show Gist options
  • Save codecowboy/1056834 to your computer and use it in GitHub Desktop.
Save codecowboy/1056834 to your computer and use it in GitHub Desktop.
Programme Entity
<?php
namespace Gymloop\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="programmes")
*/
class Programme
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\generatedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="programmes")
*/
protected $user;
/**
* @ORM\Column(type="datetime")
*/
protected $start_date;
/**
* @ORM\Column(type="datetime")
*/
protected $end_date;
/**
* @ORM\Column(type="integer")
*/
protected $weekly_target;
/**
* @ORM\Column(type="string")
*/
protected $goal;
/**
* Get id
*
* @return integer $id
*/
public function getId()
{
return $this->id;
}
public function __toString() {
return 'Programme';
}
/**
* Set start_date
*
* @param datetime $startDate
*/
public function setStartDate($startDate)
{
$this->start_date = $startDate;
}
/**
* Get start_date
*
* @return datetime $startDate
*/
public function getStartDate()
{
return $this->start_date;
}
/**
* Set end_date
*
* @param datetime $endDate
*/
public function setEndDate($endDate)
{
$this->end_date = $endDate;
}
/**
* Get end_date
*
* @return datetime $endDate
*/
public function getEndDate()
{
return $this->end_date;
}
/**
* Set weekly_target
*
* @param integer $weeklyTarget
*/
public function setWeeklyTarget($weeklyTarget)
{
$this->weekly_target = $weeklyTarget;
}
/**
* Get weekly_target
*
* @return integer $weeklyTarget
*/
public function getWeeklyTarget()
{
return $this->weekly_target;
}
/**
* Set goal
*
* @param string $goal
*/
public function setGoal($goal)
{
$this->goal = $goal;
}
/**
* Get goal
*
* @return string $goal
*/
public function getGoal()
{
return $this->goal;
}
/**
* 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 $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