192 lines
3.3 KiB
PHP
192 lines
3.3 KiB
PHP
<?php
|
|
|
|
namespace Cadoles\PortalBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* Blogcomment
|
|
*
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="blogcomment")
|
|
* @ORM\Entity(repositoryClass="Cadoles\PortalBundle\Repository\BlogcommentRepository")
|
|
* @ORM\HasLifecycleCallbacks
|
|
*/
|
|
class Blogcomment
|
|
{
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=100)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="description", type="text", nullable=true)
|
|
*/
|
|
private $description;
|
|
|
|
/**
|
|
* @ORM\Column(name="submit", type="datetime")
|
|
*/
|
|
private $submit;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Cadoles\CoreBundle\Entity\User", inversedBy="blogcomments")
|
|
* @ORM\JoinColumn(nullable=true)
|
|
*/
|
|
private $user;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Cadoles\PortalBundle\Entity\Blogarticle", inversedBy="blogcomments")
|
|
* @ORM\JoinColumn(nullable=false)
|
|
*/
|
|
private $blogarticle;
|
|
|
|
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set name
|
|
*
|
|
* @param string $name
|
|
*
|
|
* @return Blogcomment
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set description
|
|
*
|
|
* @param string $description
|
|
*
|
|
* @return Blogcomment
|
|
*/
|
|
public function setDescription($description)
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDescription()
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
/**
|
|
* Set submit
|
|
*
|
|
* @param \DateTime $submit
|
|
*
|
|
* @return Blogcomment
|
|
*/
|
|
public function setSubmit($submit)
|
|
{
|
|
$this->submit = $submit;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get submit
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getSubmit()
|
|
{
|
|
return $this->submit;
|
|
}
|
|
|
|
/**
|
|
* Set user
|
|
*
|
|
* @param \Cadoles\CoreBundle\Entity\User $user
|
|
*
|
|
* @return Blogcomment
|
|
*/
|
|
public function setUser(\Cadoles\CoreBundle\Entity\User $user = null)
|
|
{
|
|
$this->user = $user;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get user
|
|
*
|
|
* @return \Cadoles\CoreBundle\Entity\User
|
|
*/
|
|
public function getUser()
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
|
|
/**
|
|
* Set blogarticle
|
|
*
|
|
* @param \Cadoles\PortalBundle\Entity\Blogarticle $blogarticle
|
|
*
|
|
* @return Blogcomment
|
|
*/
|
|
public function setBlogarticle(\Cadoles\PortalBundle\Entity\Blogarticle $blogarticle)
|
|
{
|
|
$this->blogarticle = $blogarticle;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get blogarticle
|
|
*
|
|
* @return \Cadoles\PortalBundle\Entity\Blogarticle
|
|
*/
|
|
public function getBlogarticle()
|
|
{
|
|
return $this->blogarticle;
|
|
}
|
|
}
|