<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Comment extends Model
{
    use HasFactory;

    protected $fillable = [
        'title',
        'message',
        'author_name',
        'news_id',
    ];

    public function news(): BelongsTo
    {
        return $this->belongsTo(News::class);
    }
}
