mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 15:26:43 +02:00
fix(notifications): notify actors after activities insert / update using model callback methods
--> Remove sql triggers because most shared hosting plans prevent using them
This commit is contained in:
parent
460f52f70e
commit
e08555a4e9
10 changed files with 98 additions and 126 deletions
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright 2021 Ad Aures
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
||||
* @link https://castopod.org/
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Entities\Notification;
|
||||
use Michalsn\Uuid\UuidModel;
|
||||
|
||||
class NotificationModel extends UuidModel
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'notifications';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $returnType = Notification::class;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $useTimestamps = true;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $uuidFields = ['post_id', 'activity_id'];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $allowedFields = ['read_at'];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue