Moved yaml doctrine conf to annotation

This commit is contained in:
Andrey
2013-08-05 17:27:21 +02:00
parent 03f6b9199e
commit 22f55855d1
18 changed files with 301 additions and 148 deletions

View File

@@ -12,34 +12,42 @@
namespace Entities;
use Alchemy\Phrasea\Application;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* SessionModule
* @ORM\Table(name="SessionModules", uniqueConstraints={@ORM\UniqueConstraint(name="unique_module", columns={"session_id", "module_id"})})
* @ORM\Entity(repositoryClass="Repositories\SessionModuleRepository")
*/
class SessionModule
{
/**
* @var integer
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var integer
* @ORM\Column(type="integer")
*/
private $module_id;
/**
* @var \DateTime
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
*/
private $created;
/**
* @var \DateTime
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
*/
private $updated;
/**
* @var \Entities\Session
* @ORM\ManyToOne(targetEntity="Session", inversedBy="modules", cascade={"persist"})
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/
private $session;