Item/Traits/ContentfulSys.php
<?php
namespace Dothiv\Bundle\ContentfulBundle\Item\Traits;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
trait ContentfulSys
{
/**
* @ORM\Column(type="string")
* @ORM\Id
*
* @var string
*/
private $id;
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @Assert\NotBlank()
* @Assert\NotNull()
* @Assert\Range(min=0)
* @Assert\Type("integer")
* @var int
*/
private $revision;
/**
* @ORM\Column(type="string")
* @ORM\Id
* @Assert\NotBlank()
* @Assert\NotNull()
* @Assert\Type("string")
* @var string
*/
private $spaceId;
/**
* @ORM\Column(type="datetime")
* @Assert\NotBlank()
* @Assert\NotNull()
* @Assert\Type("\DateTime")
* @var \DateTime
*/
private $createdAt;
/**
* @ORM\Column(type="datetime")
* @Assert\NotBlank()
* @Assert\NotNull()
* @Assert\Type("\DateTime")
* @var \DateTime
*/
private $updatedAt;
/**
* @param \DateTime $createdAt
*/
public function setCreatedAt(\DateTime $createdAt)
{
$this->createdAt = $createdAt;
}
/**
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param int $revision
*/
public function setRevision($revision)
{
$this->revision = $revision;
}
/**
* @return int
*/
public function getRevision()
{
return $this->revision;
}
/**
* @param string $spaceId
*/
public function setSpaceId($spaceId)
{
$this->spaceId = $spaceId;
}
/**
* @return string
*/
public function getSpaceId()
{
return $this->spaceId;
}
/**
* @param \DateTime $updatedAt
*/
public function setUpdatedAt(\DateTime $updatedAt)
{
$this->updatedAt = $updatedAt;
}
/**
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
}