21 lines
447 B
PHP
21 lines
447 B
PHP
<?php
|
|
|
|
namespace Modules\Notification\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Modules\Auth\Entities\User;
|
|
|
|
class Notification extends Model
|
|
{
|
|
protected $fillable = ['type', 'notifiable_id', 'notifiable_type', 'data', 'read_at'];
|
|
|
|
protected $casts = [
|
|
'read_at' => 'datetime',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
} |