<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property mixed admin_read
 */
class UsersNotification extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'title',
        'message',
        'user_id',
        'service_id',
        'notification_type',
        'send_to',
        'is_read',
        'admin_read',
    ];

    protected $casts = ['is_read' => 'array'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
