Add Achievement class
This commit is contained in:
parent
5541b5b563
commit
22d28908d9
1 changed files with 65 additions and 0 deletions
65
src/Models/Achievement.php
Normal file
65
src/Models/Achievement.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace EmotionHero\Models;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use EmotionHero\Application;
|
||||
|
||||
/**
|
||||
* A Single play of a game: combines User, Level and time
|
||||
*
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="achievements")
|
||||
*/
|
||||
class Achievement
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* Title of achievement
|
||||
* @var string
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
private $title;
|
||||
|
||||
public function __construct(int $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the Title of achievement.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Title of achievement.
|
||||
*
|
||||
* @param string $title the title
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue