api.emotionhero.com/src/Models/Level.php

44 lines
749 B
PHP

<?php
namespace EmotionHero\Models;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Users
*
* @ORM\Table(name="levels")
* @ORM\Entity
*/
class Level
{
/**
* @var integer
*
* @ORM\Column(name="id",type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @ORM\OneToMany(targetEntity="Target", mappedBy="level")
*/
private $targets;
/**
* @ORM\OneToMany(targetEntity="Game", mappedBy="level", fetch="EXTRA_LAZY")
*/
private $games;
public function __construct()
{
$this->targets = new ArrayCollection();
$this->games = new ArrayCollection();
}
}