<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ActivityNotificationRead extends Model
{
    //
    protected $fillable = [
        'user_id', 'activity_id', 'due_date', 'read_at',
    ];

    protected $casts = [
        'due_date' => 'date',
        'read_at' => 'datetime',
    ];

    public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function activity(): \Illuminate\Database\Eloquent\Relations\BelongsTo
    {
        return $this->belongsTo(Activity::class);
    }
}
