Created
July 16, 2016 12:15
-
-
Save pboethig/7b600200fe840d5a1b23a7fdbc720a0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Check\BlogBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Post | |
* | |
* @ORM\Table(name="post", indexes={@ORM\Index(name="userid", columns={"userid"})}) | |
* @ORM\Entity | |
*/ | |
class Post | |
{ | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="title", type="string", length=255, nullable=false) | |
*/ | |
private $title; | |
/** | |
* @var string | |
* | |
* @ORM\Column(name="content", type="text", nullable=false) | |
*/ | |
private $content; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="created", type="datetime", nullable=false) | |
*/ | |
private $created; | |
/** | |
* @var \DateTime | |
* | |
* @ORM\Column(name="updated", type="datetime", nullable=true) | |
*/ | |
private $updated; | |
/** | |
* @var integer | |
* | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="IDENTITY") | |
*/ | |
private $id; | |
/** | |
* @var \Check\BlogBundle\Entity\User | |
* | |
* @ORM\ManyToOne(targetEntity="Check\BlogBundle\Entity\User") | |
* @ORM\JoinColumns({ | |
* @ORM\JoinColumn(name="userid", referencedColumnName="id") | |
* }) | |
*/ | |
private $userid; | |
/** | |
* Set title | |
* | |
* @param string $title | |
* | |
* @return Post | |
*/ | |
public function setTitle($title) | |
{ | |
$this->title = $title; | |
return $this; | |
} | |
/** | |
* Get title | |
* | |
* @return string | |
*/ | |
public function getTitle() | |
{ | |
return $this->title; | |
} | |
/** | |
* Set content | |
* | |
* @param string $content | |
* | |
* @return Post | |
*/ | |
public function setContent($content) | |
{ | |
$this->content = $content; | |
return $this; | |
} | |
/** | |
* Get content | |
* | |
* @return string | |
*/ | |
public function getContent() | |
{ | |
return $this->content; | |
} | |
/** | |
* Set created | |
* | |
* @param \DateTime $created | |
* | |
* @return Post | |
*/ | |
public function setCreated($created) | |
{ | |
$this->created = $created; | |
return $this; | |
} | |
/** | |
* Get created | |
* | |
* @return \DateTime | |
*/ | |
public function getCreated() | |
{ | |
return $this->created; | |
} | |
/** | |
* Set updated | |
* | |
* @param \DateTime $updated | |
* | |
* @return Post | |
*/ | |
public function setUpdated($updated) | |
{ | |
$this->updated = $updated; | |
return $this; | |
} | |
/** | |
* Get updated | |
* | |
* @return \DateTime | |
*/ | |
public function getUpdated() | |
{ | |
return $this->updated; | |
} | |
/** | |
* Get id | |
* | |
* @return integer | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* Set userid | |
* | |
* @param \Check\BlogBundle\Entity\User $userid | |
* | |
* @return Post | |
*/ | |
public function setUserid(\Check\BlogBundle\Entity\User $userid = null) | |
{ | |
$this->userid = $userid; | |
return $this; | |
} | |
/** | |
* Get userid | |
* | |
* @return \Check\BlogBundle\Entity\User | |
*/ | |
public function getUserid() | |
{ | |
return $this->userid; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment