send notification user method working
This commit is contained in:
parent
14f409abec
commit
9752fffae6
7 changed files with 67 additions and 18 deletions
|
|
@ -13,6 +13,7 @@ class BaseComment {
|
|||
protected $date;
|
||||
protected $id;
|
||||
protected $type;
|
||||
protected $isRead;
|
||||
|
||||
public function __construct($data) {
|
||||
$page = $data['page'];
|
||||
|
|
@ -44,6 +45,7 @@ class BaseComment {
|
|||
$this->date = $date;
|
||||
$this->id = $id;
|
||||
$this->type = $type;
|
||||
$this->isRead = false;
|
||||
}
|
||||
|
||||
public function page() {
|
||||
|
|
@ -78,6 +80,20 @@ class BaseComment {
|
|||
return $this->type;
|
||||
}
|
||||
|
||||
public function isRead() {
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function read() {
|
||||
$this->isRead = true;
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function unread() {
|
||||
$this->isRead = false;
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
return [
|
||||
'page' => $this->page,
|
||||
|
|
@ -88,6 +104,7 @@ class BaseComment {
|
|||
'date' => $this->date,
|
||||
'id' => $this->id,
|
||||
'type' => $this->type,
|
||||
'isRead' => $this->isRead
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue