src/Renatomefi/FormBundle/Document/ProtocolEmbed.php
<?php
namespace Renatomefi\FormBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
/**
* Class Form
* @package Renatomefi\FormBundle\Document
*/
abstract class ProtocolEmbed
{
/**
* Document startup
*/
public function __construct()
{
$this->setCreatedAt(new \MongoDate());
}
/**
* @ODM\Id(strategy="auto")
*/
protected $id;
/**
* @ODM\Date
*/
protected $createdAt;
/**
* Get id
*
* @return $id
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param \MongoDate $createdAt
* @return self
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \MongoDate $createdAt
*/
public function getCreatedAt()
{
return $this->createdAt;
}
}