for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace KI\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="KI\UserBundle\Repository\PontlyvalentRepository")
* @JMS\ExclusionPolicy("all")
*/
class Pontlyvalent
{
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
protected $id;
* Texte de commentaire
* @ORM\Column(name="text", type="text", nullable=false)
* @JMS\Expose
* @Assert\Type("string")
* @Assert\NotBlank()
protected $text;
* Date
* @ORM\Column(name="date", type="integer", nullable=true)
* @Assert\Type("integer")
protected $date;
* @ORM\ManyToOne(targetEntity="KI\UserBundle\Entity\User")
* @ORM\JoinColumn(nullable=false)
protected $target;
protected $author;
public function __construct()
$this->date = time();
}
* Get id
*
* @return integer
public function getId()
return $this->id;
* Set date
* @param integer $date
* @return Pontlyvalent
public function setDate($date)
$this->date = $date;
return $this;
* Get date
public function getDate()
return $this->date;
* Set text
* @param string $text
public function setText($text)
$this->text = $text;
* Get text
* @return string
public function getText()
return $this->text;
* Set target
* @param User $target
public function setTarget($target)
$this->target = $target;
* Get target
* @return User
public function getTarget()
return $this->target;
* Set author
* @param User $author
public function setAuthor(User $author)
$this->author = $author;
* Get author
public function getAuthor()
return $this->author;