Skip to content

Commit

Permalink
Add Event entity class
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthaler committed Jul 20, 2014
1 parent 3e646f5 commit bd4de74
Showing 1 changed file with 167 additions and 0 deletions.
167 changes: 167 additions & 0 deletions src/ML/EventApiBundle/Entity/Event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?php

namespace ML\EventApiBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;

/**
* Event
*
* @ORM\Table()
* @ORM\Entity
*/
class Event
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;

/**
* The event's name
*
* @var string
*
* @Assert\NotBlank()
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;

/**
* Description of the event
*
* @var string
*
* @Assert\NotBlank()
* @ORM\Column(name="description", type="text")
*/
private $description;

/**
* The start date and time of the event in ISO 8601 date format
*
* @var \DateTime
*
* @Assert\NotBlank()
* @ORM\Column(name="startDate", type="datetime")
*/
private $startDate;

/**
* The end date and time of the event in ISO 8601 date format
*
* @var \DateTime
*
* @Assert\NotBlank()
* @ORM\Column(name="endDate", type="datetime")
*/
private $endDate;


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

/**
* Set name
*
* @param string $name
* @return Event
*/
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 Event
*/
public function setDescription($description)
{
$this->description = $description;

return $this;
}

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

/**
* Set startDate
*
* @param \DateTime $startDate
* @return Event
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;

return $this;
}

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

/**
* Set endDate
*
* @param \DateTime $endDate
* @return Event
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;

return $this;
}

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

0 comments on commit bd4de74

Please sign in to comment.