<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class StageAcademyCourseSubCategory extends Model
{
    use SoftDeletes;

    protected $fillable = ['category_id', 'name_ar', 'name_en', 'description_ar', 'description_en'];

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

    public function courses()
    {
        return $this->hasMany(StageAcademyCourse::class, 'sub_category_id');
    }
}
