Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // src/BlogBundle/Entity/Post.php
- namespace BlogBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Post
- *
- * @ORM\Table(name="post")
- * @ORM\Entity(repositoryClass="BlogBundle\Repository\PostRepository")
- */
- class Post
- {
- /**
- * @var int
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @var string
- *
- * @ORM\Column(name="title", type="string", length=255)
- */
- protected $title;
- /**
- * @var string
- *
- * @ORM\Column(name="content", type="text")
- */
- protected $content;
- /**
- * @var User
- *
- * @ORM\ManyToOne(targetEntity="BlogBundle\Entity\User")
- * @ORM\JoinColumn(name="author_id", referencedColumnName="id")
- */
- protected $author;
- http://github.com/shfx17
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement