The whole idea for notifications is for them to be generated automatically by the system. This means that for most of db
queries, the system should generate a notification automatically and alert the user(s) who are involved to that event.
The Notifications
class concerns users only, so the basic properties for the Notification
entity would be as follows:
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Notification * @ORM\Table(name="notification") * @ORM\Entity(repositoryClass= "AppBundle\Entity\NotificatioRepository") */ class Notification { /** * @var integer * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * @ORM\Column(name="subject", type="string", length=45) */ private $subject; /** * @var string * @ORM\Column(name="body", type="text", nullable=true) */ private $body...