<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Alert extends Model
{
    protected $guarded = [];
    
    // protected $fillable = [
    //     'product_id',
    //     'title',
    //     'message',
    //     'stock',
    //     'minimum_stock',
    //     'is_read'
    // ];

    public function markAsRead()
    {
        $this->is_read = true;
        $this->save();
    }
}
