2022-08-12 16:02:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
2022-09-08 11:50:23 +00:00
|
|
|
* @copyright 2022 Ad Aures
|
2022-08-12 16:02:56 +00:00
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
2022-09-08 11:50:23 +00:00
|
|
|
namespace Modules\Fediverse\Models;
|
2022-08-12 16:02:56 +00:00
|
|
|
|
2022-09-08 11:50:23 +00:00
|
|
|
use Modules\Fediverse\Entities\Notification;
|
2022-08-12 16:02:56 +00:00
|
|
|
|
2022-09-08 11:50:23 +00:00
|
|
|
class NotificationModel extends BaseUuidModel
|
2022-08-12 16:02:56 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @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[]
|
|
|
|
*/
|
2022-09-08 11:50:23 +00:00
|
|
|
protected $allowedFields = [
|
|
|
|
'actor_id',
|
|
|
|
'target_actor_id',
|
|
|
|
'post_id',
|
|
|
|
'activity_id',
|
|
|
|
'type',
|
|
|
|
'read_at',
|
|
|
|
'created_at',
|
|
|
|
'updated_at',
|
|
|
|
];
|
2022-08-12 16:02:56 +00:00
|
|
|
}
|