| Total Complexity | 3 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Notification extends NotificationModel |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @ORM\Id |
||
| 18 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 19 | * @ORM\Column(type="integer") |
||
| 20 | */ |
||
| 21 | protected $id; |
||
| 22 | /** |
||
| 23 | * @ORM\ManyToOne(targetEntity="User") |
||
| 24 | */ |
||
| 25 | protected $user; |
||
| 26 | /** |
||
| 27 | * @ORM\Column(type="string", length=255) |
||
| 28 | */ |
||
| 29 | protected $content; |
||
| 30 | /** |
||
| 31 | * @ORM\Column(type="datetime") |
||
| 32 | */ |
||
| 33 | protected $createdAt; |
||
| 34 | /** |
||
| 35 | * @ORM\Column(type="datetime", nullable=true) |
||
| 36 | */ |
||
| 37 | protected $readAt; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @ORM\PrePersist() |
||
| 41 | */ |
||
| 42 | public function prePersist() |
||
| 43 | { |
||
| 44 | $this->createdAt = new \DateTime(); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function setId(int $id): Notification |
||
| 48 | { |
||
| 49 | $this->id = $id; |
||
| 50 | |||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getId(): int |
||
| 57 | } |
||
| 58 | } |