-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |