<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Resource extends Model
{
    protected $fillable = [
        'category_id',
        'title',
        'description',
        'file_path',
        'external_url',
        'resource_type',
        'youtube_embed_id',
        'thumbnail',
        'sort_order',
        'is_active',
    ];

    public function category()
    {
        return $this->belongsTo(ResourceCategory::class, 'category_id');
    }
}
