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

56 lines
1.0 KiB
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="targets")
* @ORM\Entity
*/
class Target
{
/**
* @var integer
*
* @ORM\Column(name="id",type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="Level", inversedBy="targets")
* @ORM\JoinColumn(name="level_id", referencedColumnName="id", nullable=false)
*/
private $level;
/**
* @var float
*/
private $time;
/**
* @ORM\ManyToOne(targetEntity="Emotion", inversedBy="targets")
* @ORM\JoinColumn(name="emotion_id", referencedColumnName="id", nullable=false)
*/
private $emotion;
/**
* @ORM\OneToMany(targetEntity="Hit", mappedBy="target", fetch="EXTRA_LAZY")
*/
private $hits;
public function __construct()
{
$this->hits = new ArrayCollection();
}
}