src/Entity/Notification.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  6. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\HttpFoundation\File\UploadedFile;
  12. use Symfony\Component\HttpFoundation\File\File;
  13. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  14. /**
  15.  * @ORM\Entity
  16.  * @ORM\Table(name="notification")
  17.  */
  18. class Notification implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  19.     use BlameableTrait;
  20.     use TimestampableTrait;
  21.     
  22.     use SoftDeletableTrait;
  23.     
  24. /**
  25.      * @ORM\Id
  26.      * @ORM\Column(type="integer")
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     protected $id;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="notifications")
  32.      */
  33.     private $user;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="content", type="string", length=255, nullable=true)
  38.      */
  39.     private $content;
  40.     /**
  41.      * Get id
  42.      *
  43.      * @return integer
  44.      */
  45.     public function getId()
  46.     {
  47.         return $this->id;
  48.     }
  49.     /**
  50.      * Set content
  51.      *
  52.      * @param string $content
  53.      *
  54.      * @return Notification
  55.      */
  56.     public function setContent($content)
  57.     {
  58.         $this->content $content;
  59.         return $this;
  60.     }
  61.     /**
  62.      * Get content
  63.      *
  64.      * @return string
  65.      */
  66.     public function getContent()
  67.     {
  68.         return $this->content;
  69.     }
  70.     /**
  71.      * Set user
  72.      *
  73.      * @param \App\Entity\User $user
  74.      *
  75.      * @return Notification
  76.      */
  77.     public function setUser(\App\Entity\User $user null)
  78.     {
  79.         $this->user $user;
  80.         return $this;
  81.     }
  82.     /**
  83.      * Get user
  84.      *
  85.      * @return \App\Entity\User
  86.      */
  87.     public function getUser()
  88.     {
  89.         return $this->user;
  90.     }
  91. }