<?php

namespace App\Models;

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

class Announcement extends Model
{
    use HasFactory;

    protected $fillable = [
        'title',
        'content',
        'image',
        'posted_by',
        'expiry_date',
        'is_active'
    ];

    // Relationships
    public function postedBy()
    {
        return $this->belongsTo(User::class, 'posted_by');
    }
}